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

Re: [pygame] Convert() loses alpha



To: <pygame-users@seul.org>
Sent: Thursday, September 30, 2004 10:53 PM
Subject: Re: [pygame] Convert() loses alpha
> > On Thu, 30 Sep 2004 22:15:26 -0700, Dmitry Borisov wrote:
> > > I was trying these also:
> > >     image= pygame.image.load( name ).convert( 32, SRCALPHA )
> > > and
> > >     image= pygame.image.load( name )
> > >     s= Surface( size ).convert_alpha()
> > >     s.blit( image, (0,0) )
> >
> > Try this one:
> >
> > image = pygame.image.load(name)
> > image = image.convert_alpha()
>
> I tried that also, it is making the whole image transparent. So my
> background just empty.
> Dmitry/

I just took a look at directx5 driver in SDL and saw that it does _not_ use
any HW operations even though it is there.
Init function just assigns everything to be SWSURFACE and most of graphic
card cannot use HW ops on it.
So if you use directx or windib it'll almost always be SW ops and alpha
blitting is way _too_ slow.
Too bad. I'll go with DX9 and may be I'll build a Python bindings to it. If
anyone is aware of such an activity, let me know...
Dmitry/