[SDL] Loading alpha-channeled PNGs?

DARKGuy . dark.guy.2008 at gmail.com
Tue Sep 12 21:57:29 PDT 2006


Hi! ^^

Thanks for answering :)

Well something must be going wrong here then, look:
http://i7.tinypic.com/4c25mz7.jpg

The image has alpha channel as you can notice in the PSP window, and in the
SDL, it doesn't seem to get it. That's what happens when I remove the
SDL_SetColorKey instruction. Any idea? =/

On 9/13/06, Ryan C. Gordon <icculus at icculus.org> wrote:
>
>
> > 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.
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>



-- 
- Alemar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060913/0f6386a8/attachment-0008.htm>


More information about the SDL mailing list