Please don't send me the name of a function, if you can help please
send a tidbit of code to use!
-Thanks
There are faster ways than examining each pixel using GetPixel. My personal
choice would be to create a true-color (24 bit) section DIB. I'd select that
bitmap into one memory DC and the bitmap to be examined into another memory
DC. I'd blit the bitmap to be examined onto the section DIB, then I'd
examine the section DIB's memory; the colors would be neatly laid out: red
byte, green byte, blue byte, red byte, green byte, blue byte.
I have a whole MFC app that allows you to load a bitmap and examine each of
its pixels. I can E-Mail it to you on request.
--Lee
Thomas Johnson <por...@idcomm.com> wrote in message
news:370D5CF8...@idcomm.com...
HDC hdc;
COLORREF col;
DWORD red,green,blue;
HBITMAP bitmap,oldbitmap;
// Assuming you already have the HBITMAP setup (no error checking)
// Create a device context same as the screen
hdc = CreateCompatibleDC(NULL);
// Select the HBITMAP into that device context
oldbitmap = (HBITMAP)SelectObject(hdc,bitmap);
// Get the color and RGB values
col=GetPixel(hdc,x,y);
red=GetRValue(col);
green=GetGValue(col);
blue=GetBValue(col);
// Clean up
SelectObject(hdc,oldbitmap);
DeleteDC(hdc);