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

Re: [pygame] How do I make a image transparent?



Tell me what you think: http://cleanscript.com/Map/main3.py

On 9/11/07, Lamonte Harris < pyth0nc0d3r@xxxxxxxxx> wrote:
Thanks :) works like a charm :P.

On 9/11/07, Luke Paireepinart <rabidpoobear@xxxxxxxxx > wrote:
Lamonte Harris wrote:
> See I got this png file w/ a white BG :( is it possible to make the
> white in the BG of the image transparent?
Of course - look into the setcolorkey method of surfaces.  You'd just
set the color key to white.
255 blue is more common as a colorkey, since white is much more common
as a color, but it will work just fine in this case since there's no
white in the sprites themselves, just in the backgrounds.