a simple problem with image processing
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!
Re: a simple problem with image processing
You cannot do this. Possible solutions are to change pixel format or to keep this rectangle as overlay. Overlay information is kept outside of an image, and drawn over image when it is displayed.
Re: a simple problem with image processing
Quote:
Originally Posted by
Angela2010
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