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

Re: [pygame] Transparent PNGs



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?

What happens for you if you use the "spikes2.png" image you posted
earlier fail with this code?

On 6/5/07, kschnee@xxxxxxxxxx <kschnee@xxxxxxxxxx> wrote:
Following an old thread: I posted a transparent PNG and said it
mysteriously wouldn't show as transparent. To show the code that gives
that result:

import pygame
import os
pygame.init()
s = pygame.display.set_mode((640,480))
i = pygame.image.load(os.path.join("graphics","Game
Logo.png")).convert_alpha()
s.blit(i,(100,50))
pygame.display.update()

I did do convert_alpha, which I thought would tell Pygame to handle the
transparency data, but it doesn't seem to. I get a logo with white
background, obvious against the black.