Hi,
It is from MSDN example of locking bitmap, where this code is shown. They read pixels and detects the color or set it. However I dont understand why the color is only simple value like 0-255. I would expect RGB with three values : Red, Green, Blue. So it is not clear to me how can I get the value which I looks for. For example I would want to look for color in hex color="aaff08" ... So how should I convert it and which function to use to get the correct value in RGB. It contains no alpha channel. (I am beginner in C++)
http://paste.ofcode.org/ntpebmjHEBYWdvzeX4H25p
line 39-40
Code:
for ( int counter = 8; counter < rgbValues->Length; counter += 9 )
rgbValues[ counter ] = 255;
This is the code they use, and here the rgbValues with single integer is quite strange to me.
It is from MSDN example of locking bitmap, where this code is shown. They read pixels and detects the color or set it. However I dont understand why the color is only simple value like 0-255. I would expect RGB with three values : Red, Green, Blue. So it is not clear to me how can I get the value which I looks for. For example I would want to look for color in hex color="aaff08" ... So how should I convert it and which function to use to get the correct value in RGB. It contains no alpha channel. (I am beginner in C++)
http://paste.ofcode.org/ntpebmjHEBYWdvzeX4H25p
line 39-40
Code:
for ( int counter = 8; counter < rgbValues->Length; counter += 9 )
rgbValues[ counter ] = 255;
This is the code they use, and here the rgbValues with single integer is quite strange to me.
