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

Re: [pygame] convert_alpha without pygame.display init



Wow, what a trip.  I ran into almost the exact same problem yesterday.  I thought I needed to 
do what you were doing as well so I got on #pygame and ShreddedWheat helped me out.  
To get a surface with an alpha channel without using convert_alpha(), you can pass some 
arguments to the Surface init routine:

s = pygame.Surface((50,50), SRCALPHA, 32)

Hope that helps!

Regards,
Steve


On 21 Feb 2004 at 15:23, jabberwocky wrote:

> If I try to convert_alpha without display
> initialization I obtain an segfault:
> 
> import pygame
> s = pygame.Surface((50, 50))
> s.convert_alpha()
> 
> Fatal Python error: (pygame parachute) Segmentation
> Fault
> 
> 
> 
> ______________________________________________________________________
> Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati,
> l'antivirus, il filtro Anti-spam
> http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/
>