Thread: How do read bitmap x,y pixel coords?

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Question How do read bitmap x,y pixel coords?

    How can I tell if pixel 3x9 on my bitmap (which is loaded into a HBITMAP var) is the color RGB(0,10,250)?
    I have tried to use GetPixel() but that only reads the color of a pixel that is currently printed on the screen.

    Please help!

  2. #2
    vae victus! skorman00's Avatar
    Join Date
    Nov 2003
    Posts
    594
    GetPixel() does not get pixels on the screen, it gets pixels that are on a device context, which may or may not be drawn to the screen (yes I am a smart arse). With just that, you can draw to the dc, GetPixel(), then clear the dc again.

    But that would be silly, use GetBitmapBits().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading a Bitmap resource for OpenGL Texture[x]
    By the dead tree in forum Game Programming
    Replies: 4
    Last Post: 08-26-2004, 01:12 PM
  2. pixel in Bitmap??
    By SuperNewbie in forum Game Programming
    Replies: 5
    Last Post: 02-01-2003, 01:43 PM
  3. Saving a bitmap.
    By jdinger in forum Game Programming
    Replies: 4
    Last Post: 05-01-2002, 01:40 PM
  4. Windows Pixel Blocks... PLEASE READ!
    By minime6696 in forum Windows Programming
    Replies: 20
    Last Post: 01-24-2002, 08:33 PM
  5. Bitmap Pixel
    By Alextrons in forum Windows Programming
    Replies: 2
    Last Post: 10-28-2001, 08:18 PM