[SDL] Detect indexed-alpha images?
Justin Coleman
jmcoleman at gmail.com
Sun Feb 5 15:51:49 PST 2006
On 2/5/06, mal content <artifact.one at googlemail.com> wrote:
> > How can I reliably detect if an image loaded with IMG_Load is in indexed-alpha
> > format? I am loading surfaces into OpenGL, so it's important to be able to
> > detect 100%.
>
> Hmm, this is a bit of an oversight isn't it? Is there any way this
> could be rectified
> in SDL 1.3? Having tried a number of approaches, there seems to be no way
> to distinguish two indexed PNG files, one with alpha and one without. This is
> very bad as it pretty much cripples the OpenGL texture manager that I've been
> trying to get finished...
Coerce your artists to set the colorkey non-zero for indexed alpha
images. Of course, this only works if you have some control over what
images will be loaded...
More information about the SDL
mailing list