mirror of https://github.com/GNOME/gimp.git
plug-ins: fix #1111 TGA with indexed colors + alpha channel : not displayed correctly
Just like COLOR targa MAPPED (indexed) images with a size of 32 per index should also have alphaBits set to 8 or else the images get loaded incorrectly.
This commit is contained in:
parent
a637692533
commit
a77131db3c
|
@ -547,6 +547,9 @@ load_image (GFile *file,
|
|||
/* hack to handle yet another flavor of incorrect headers, see bug #540969 */
|
||||
if (info.alphaBits == 0)
|
||||
{
|
||||
if (info.imageType == TGA_TYPE_MAPPED && info.colorMapSize == 32)
|
||||
info.alphaBits = 8;
|
||||
|
||||
if (info.imageType == TGA_TYPE_COLOR && info.bpp == 32)
|
||||
info.alphaBits = 8;
|
||||
|
||||
|
|
Loading…
Reference in New Issue