[gimp] plug-ins: fix #1111 TGA with indexed colors + alpha channel : not displayed correctly
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix #1111 TGA with indexed colors + alpha channel : not displayed correctly
- Date: Fri, 15 Oct 2021 15:57:40 +0000 (UTC)
commit a77131db3c52f77bf854da0dd81b2ef40faf0556
Author: Jacob Boerema <jgboerema gmail com>
Date: Fri Oct 15 11:43:34 2021 -0400
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.
plug-ins/common/file-tga.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c
index 09aab84f9f..8a74ecc51e 100644
--- a/plug-ins/common/file-tga.c
+++ b/plug-ins/common/file-tga.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]