Very very Urgent : Getting the color value of a pixel for 16-bpp bitmap
-
Im using a 16-Bpp Bitmap, With biCompression = BI_BITFIELDS. Im trying to get a color at a pixel in this bitmap. Im reading the pixel data and applying the Masks in the BmpInfoHeader and calculating the color value. The color value obtained this way is different from the color obtained using GetPixel() after rendering the Bitmap on screen using SetDIBitStoDevice(). Why is it so? Thanks in advance.
Uday kiran
-
Im using a 16-Bpp Bitmap, With biCompression = BI_BITFIELDS. Im trying to get a color at a pixel in this bitmap. Im reading the pixel data and applying the Masks in the BmpInfoHeader and calculating the color value. The color value obtained this way is different from the color obtained using GetPixel() after rendering the Bitmap on screen using SetDIBitStoDevice(). Why is it so? Thanks in advance.
Uday kiran
I guess to answer this, we need to know how they differ, and how you're doing your calculation. Do you realise that the color is stored within the bitmap as BGR, not RGB ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog