TransparentIndex should still be set with forced colour mode

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

Post Reply
Defenestration
Posts: 47
Joined: Fri Aug 18, 2006 7:08 pm

TransparentIndex should still be set with forced colour mode

Post by Defenestration » Sun Dec 07, 2008 3:44 am

When loading with a forced colour model which has the Alpha channel (GFL_RGBA | GFL_ABGR | GFL_BGRA | GFL_ARGB), it would be nice if the TransparentIndex and ColorMap fields were still filled out with the correct information if the image has a colour map with or without transparency.

Without this information, there is no way to determine the following info without loading it twice (once without forced colour model, and then with)

a) if the image had transparency
b) if the image had a colour map
c) what colour was used for transparency (this can obviously be determined if you know (a) and (b))

Defenestration
Posts: 47
Joined: Fri Aug 18, 2006 7:08 pm

Post by Defenestration » Sun Dec 07, 2008 4:38 am

My mistake - it would appear the TransparentIndex is still filled out, but the ColorMap field is not. However, without ColorMap, the TransparentIndex field is kinda useless on its own.

Post Reply