[SDL] sdl_image, SDL_SetColorKey , png

Brian Barrett brian.ripoff at gmail.com
Sat Dec 18 11:40:24 PST 2010

If you are loading a PNG, the image might have an alpha channel. If
so, SDL will use the alpha channel by default (see
http://www.libsdl.org/docs/html/sdlblitsurface.html). You can use
SDL_SetAlpha to disable this:

Alternatively you might use your favourite image editor to replace the
"blank" colour with pixels sporting 0 alpha.

On 17 December 2010 21:19, erik kooistra <stipmonster at gmail.com> wrote:
> hi,
> i tried to use the sdl_image extension to load a png and use SDL_SetColorKey
> to remove the background color but it doesn't work for some reason.

More information about the SDL mailing list