By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,369 Members | 1,584 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,369 IT Pros & Developers. It's quick & easy.

SetPixel and colors

P: n/a
Somebody can explain me why if I put a color with SetPixel the color showed
is of another value? For example: I've to draw a grayscale image. The color
RGB(90,90,90) become RGB(40,45,60). In the Visual C++ 6 help I see:

Return Values
If the function succeeds, the return value is the RGB value that the
function sets the pixel to. This value may differ from the color specified by
crColor; that happens when an exact match for the specified color cannot be
found.

This happen when I set my diplay number of colors as 65.000: If I set the
display numbers of colors at 16000000 the colors I put with setPixel are
really diplayed on the screen. But I'm thinking: all the colors I want to
draw with SetPixel are out of range?? Yes. becouse all the colors are wrong
after SetPixel.

I want to copy a picture on the screen. I open the original picture with
Paint Shop Pro and all the colors are ok. I copy the screen with the "Print
Screen" button and copy it in PSP. All the color matchs the original. If I
reply the image with SetPixel, copy with "Print Screen" and put it in PSP the
colors are very diffents than originals.

WHY. This is not the first time I use SetPixel.

Tahnk you.
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"mark" <ma**@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
Somebody can explain me why if I put a color with SetPixel the color
showed
is of another value? For example: I've to draw a grayscale image. The
color
RGB(90,90,90) become RGB(40,45,60). In the Visual C++ 6 help I see:


If no one resonds with better advice here you can post again in the graphics
group

microsoft.public.win32.programmer.gdi

Regards,
Will
Nov 17 '05 #2

P: n/a
"mark" <ma**@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
Somebody can explain me why if I put a color with SetPixel the color
showed
is of another value? For example: I've to draw a grayscale image. The
color
RGB(90,90,90) become RGB(40,45,60). In the Visual C++ 6 help I see:


If no one resonds with better advice here you can post again in the graphics
group

microsoft.public.win32.programmer.gdi

Regards,
Will
Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.