|
-
November 5th, 2011, 10:31 PM
#1
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!
-
November 6th, 2011, 01:13 AM
#2
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.
-
November 7th, 2011, 09:03 AM
#3
Re: a simple problem with image processing
 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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|