[SDL] PNG Alpha Transparentcy
grimfang4 at gmail.com
Fri Dec 3 17:42:10 PST 2010
It's SDL 1.2, right? SDL_image does load the alpha channel. If you're
using OpenGL, you will probably need to enable alpha blending with
On Fri, Dec 3, 2010 at 5:38 PM, Christian Leger <chrism.leger at gmail.com>wrote:
> 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
> SDL mailing list
> SDL at lists.libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL