469,644 Members | 1,717 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

SetPixel and colors

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
2 2051
"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
"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.

Similar topics

1 post views Thread by Peter | last post: by
reply views Thread by mark | last post: by
2 posts views Thread by Matthew | last post: by
3 posts views Thread by Atmapuri | last post: by
1 post views Thread by tamasumalta | last post: by
3 posts views Thread by Seabass | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.