[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] get coluor of a sprite



if you wanted to get the overall average color of a sprite, you would have to use a for loop to go through all the pixels and count the pixels of each color or something
----- Original Message -----
> From: "Aaron Maupin" <maupin@xxxxxxxxxxxxxx>
> To: pygame-users@xxxxxxxx
> Subject: Re: [pygame] get coluor of a sprite
> Date: Sat, 27 Dec 2008 05:22:12 +0900
> 
> 
> Gonzalo Castro wrote:
> > What function may I use to get the colour of a sprite?
> 
> Very easy.  Use Surface.get_at((x, y)) where x and y equals the 
> pixel in the surface you want to check the color of.
> 
> http://www.pygame.org/docs/ref/surface.html#Surface.get_at

>


=
Military Relocation Service
Jan and Mary Team get you moving. Professional Real Estate Services.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=e12ad774014ddc03c02fb38da65ab85a


-- 
Powered by Outblaze