[SDL] Loading alpha-channeled PNGs?

Ryan C. Gordon icculus at icculus.org
Tue Sep 12 21:46:42 PDT 2006


> Somehow I'm missing something here. My question is: Anybody knows how to 
> load the PNG file, and use the Alpha channel as the transparency one, 
> and not a RGB 0,0,0 color key as if it was a plain 8-bit image?
> 
> Thanks in advance :)

Just don't use a color key...the PNG should retain its alpha channel in 
the surface that IMG_Load() returns.

--ryan.





More information about the SDL mailing list