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.
i use powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer,
Inc. build 5370)., width the latest version of sdl and sdl_image.
even wen i try to use the source from this page http://
www.lazyfoo.net/SDL_tutorials/lesson05/index.php
it still doesn’t work. does someone know a solution for this problem.
erik
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:
http://www.libsdl.org/docs/html/sdlsetalpha.html
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 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.