[SDL] PNG Alpha Transparentcy
chrism.leger at gmail.com
Fri Dec 3 14:38:13 PST 2010
I've had this exact problem. I don't even know whether or not the SDL_image
libs support keeping the alpha when loading png's.
What I've done is to write a simple conversion function which takes a 24-bit
image and converts it to a 32-bit image, assigning alpha of 255 everywhere
that the image isn't black, and alpha of 0 everywhere else. If that sounds
like code you could use, I'll gladly send it over.
On Fri, Dec 3, 2010 at 5:11 PM, image28 <image28 at slingshot.co.nz> wrote:
> I replaced the line SDL_LoadBMP with SDL-image's IMG_Load function in the
> testgl.c program from the tests folder in the SDL source package.
> But the image no long shows up transparent, it has a black background
> around it. I made the transparent png file with the gimp... Any ideas?
> SDL mailing list
> SDL at lists.libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL