[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [SPAM: 6.000] Re: [pygame] How do I make a image transparent?
> > You can generate the soft edges by asking your artist to draw the
> > sprites in high resolution, on a transparent background, and then
> > scale them down.
>
> If it involves soft edges, doesn't it involve per-pixel alpha?
Yes, my point was that with RLE you can get the per pixel alpha for
almost the same cost as colorkey blits, if most of the pixels are
either solid or completely transparent. I think the Pygame manual
could stress this a bit more, right now you don't really get any
hints..
In my game Airstrike I programmed it so that you can choose at run
time if the sprites should have colorkey or per pixel transparency. If
the user choose the colorkey option I fill all transparent pixels with
the key color. One case where you might want to do this is if your
have hardware supported colorkey blits, but not hardware alpha blits.
The good point with this system is that users with fast machines can
get good looking edges, and the graphics will look less dated in the
future. The downside is that the artist cannot hand-optimize the look
of the edges, so the color-keyed sprites look a little worse than they
could.
Ulf