How Can I get the color of a pixel?

I want to know the color of pixel(x,y), how can I get it?

Regards!

/*
*Welcome to cocobear’s home!
*http://cocobear.cn
*/

There’s GetPixel() and PutPixel() functions in the SDL docs:

http://www.libsdl.org/cgi/docwiki.cgi/Pixel_20Access?action=highlight&value=getpixel

Enjoy! =D

cocobear wrote:> I want to know the color of pixel(x,y), how can I get it?

Regards!

/*
*Welcome to cocobear’s home!
*http://cocobear.cn
*/

? Tue, 27 Nov 2007 02:05:31 -0500
L-28C ??:

There’s GetPixel() and PutPixel() functions in the SDL docs:

http://www.libsdl.org/cgi/docwiki.cgi/Pixel_20Access?action=highlight&value=getpixel

Enjoy! =D

Thanks! :slight_smile:

cocobear wrote:

I want to know the color of pixel(x,y), how can I get it?

Regards!

/*
*Welcome to cocobear’s home!
*http://cocobear.cn
*/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Regards!

/*
*Welcome to cocobear’s home!
*http://cocobear.cn
*/