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

Re: [pygame] Transparent PNGs



On Wed, Jun 06, 2007 at 02:38:18PM -0400, Kris Schnee wrote:
> Brian Fisher wrote:
> >This isn't really enough for other people to test what is failing for 
> >you...
> >
> >Can you post the "Game Logo.png" that fails for you with this code?
> 
> Here's the image I'm testing it with.
> http://kschnee.xepher.net/pics/Game%20Logo.png
...
> I get a logo with a white background, on black.

It's not a transparent image.  It's an 8-bit/color RGB image with a
white background.  If anti-aliasing is not important to you, you can
drop the convert_alpha() and use i.set_colorkey((255, 255, 255)), but
for best results open an image editor and make the image properly
transparent.

Marius Gedminas
-- 
I've been in the sun for a week.  I took the bold step of leaving my
laptop at home.  I found only 4K messages pending when I returned.
        -- Keith Packard

Attachment: signature.asc
Description: Digital signature