[gimp/gimp-2-10] 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/gimp-2-10] plug-ins: fix #1111 TGA with indexed colors + alpha channel : not displayed correctly
- Date: Tue, 18 Jan 2022 20:06:15 +0000 (UTC)
commit 1df5f20d655c7c018a824b605df14fa6b9e6707c
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.
(cherry picked from commit a77131db3c52f77bf854da0dd81b2ef40faf0556)
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 8d6726bb52..47684599e8 100644
--- a/plug-ins/common/file-tga.c
+++ b/plug-ins/common/file-tga.c
@@ -548,6 +548,9 @@ load_image (const gchar *filename,
/* 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]