Anyone have a good example of extracting pixel colors from surface, following code give me values but they don't match.
COLORREF c;
int n;
surface.GetPixel( x, y, &c);
n = GetBValue( c); // Extracting red value;
I get 0 from n when it's zero, but then I get 96 or 104 for all the other colors I use. Is GetBValue mixing up the bit order maybe?
/nB
COLORREF c;
int n;
surface.GetPixel( x, y, &c);
n = GetBValue( c); // Extracting red value;
I get 0 from n when it's zero, but then I get 96 or 104 for all the other colors I use. Is GetBValue mixing up the bit order maybe?
/nB