Quote Originally Posted by Angela2010 View Post
Hi all
I am doing some work about image processing using c++ ;How can I draw a red rectangular in a 8 bit bmp file , I can set the pixel value to 255 to creat a rectangular , but it is not red ! can someone help me with this ,Thank you very much!
Best wishes!
Can you please provide some more info:
Is the bitmap a file or in memory?
Which function are you using to "draw"?
Why do you think that 255 should be red?
AFAIK 255 in a 8bit bmp stands for the last color in the palette and not for red.

Using gdi functions draw the color RGB(255,0,0) and not 255.

Regards
PA