[SDL] Re: Alpha blending
mongoose at WPI.EDU
Sun Apr 2 13:41:14 PDT 2000
You can use targas which can have a second layer stored in the image
containing the alpha levels of each pixel.
On Sun, 02 Apr 2000, you wrote:
> Sam Lantinga wrote:
> > > Is there a way to do per-pixel (as opposed to entire surface) alpha
> > > blending with SDL? I'd like to use the alpha channel stored by an image
> > > editor.
> > Yes, but there have been some bugs reported in that the conversion loses
> > alpha information. Take a look at the testalpha test program to see how
> > it can be done.
> I looked at the example, and that's exactly what I want to do, except that I
> want to load alpha information from an image file rather than specify it
> manually (I'm loading PNG files saved by The GIMP, via the SDL_image
> package). This does not seem to happen automatically though; I get an opaque
> image when I blit it.
> I think I can make do with per-surface alpha for now (it does look good),
> but per-pixel would allow a lot of neat effects.
> J. Reeves Hall, Georgia Tech CS Major
> Linux #5 SMP Mon Mar 20 21:56:31 EST 2000
> 4:08pm up 8 days, 1:54, 7 users, load average: 0.08, 0.05, 0.01
-Garrett, WPI student majoring in Computer Science
"The fastest way to succeed is to look as if you're playing by somebody
else's rules, while quietly playing by your own." -Michael Konda
More information about the SDL