color of a pixel

color of a pixel

Post by ru.. » Wed, 19 Jul 2000 04:00:00



how can I get the color of a pixel in a rectangle or in
a specific point (x,y)
i've tried to use the CDC class member "GetPixel" but it dosen't give
me the exact color of the pixel do i have to define something before it
or should I use another function ?

I'm waiting for your answer
Thanks

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

color of a pixel

Post by Xazzir » Wed, 19 Jul 2000 04:00:00



Quote:> how can I get the color of a pixel in a rectangle or in
> a specific point (x,y)
> i've tried to use the CDC class member "GetPixel" but it dosen't give
> me the exact color of the pixel do i have to define something before it
> or should I use another function ?

> I'm waiting for your answer

You can wait for a very long time, because your question is off-topic. This
newsgroup deals with standard C++ only. Your question pertains to Windows
GDI and MFC, more suitable newsgroups for those topics are

suggest asking your question in any one of those.

X.

 
 
 

1. How do you get the color of a pixel based on a graphics object

I am trying to figure out the color of the pixel under the cursor. So
suffice to say, I have coordinates, and a graphics object created in
WM_PAINT.

I tried the following which always returns black
HDC dc = graphics.GetHDC();
COLORREF cr = GetPixel(dc,4,4);
graphics.ReleaseHDC(dc);

I know you can use GetPixel off of Bitmap, however I dont think you can get
the bitmap associated with the graphics object created from an HDC.

Any suggestions?

2. help needed in db trigger

3. Color of a pixel

4. SYSTEM.WEB.UI.PAGE not found.

5. The RGB-color of transparent pixels in an icon?

6. Autostarting a sked based on MSMQ message receipt.

7. Need to get color of bitmap pixel

8. VSNet Install Problem from created DVD

9. creating a bitmap with the proper pixel color masks

10. bitmaps, colors, and transparent pixels (help!)

11. getting pixel color?

12. Control color usage on bitonal images (1 bit / pixel) HELP

13. get pixel color with winapi