From 538dc9e6aa37364e24f57e96c53561b351b03f43 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 25 Mar 2020 11:11:13 -0300 Subject: [PATCH] Fix loading fully transparent TGA images in 32 bpp --- src/app/file/tga_format.cpp | 5 +++++ src/tga | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/file/tga_format.cpp b/src/app/file/tga_format.cpp index 5a905760c..9521a5e33 100644 --- a/src/app/file/tga_format.cpp +++ b/src/app/file/tga_format.cpp @@ -181,6 +181,11 @@ bool TgaFormat::onLoad(FileOp* fop) return false; } + // Fix alpha values for RGB images + decoder.postProcessImage(header, tgaImage); + + // Post process gray image pixels (because we use grayscale images + // with alpha). if (header.isGray()) { doc::LockImageBits bits(image); for (auto it=bits.begin(), end=bits.end(); it != end; ++it) { diff --git a/src/tga b/src/tga index 90f54d110..d821575f5 160000 --- a/src/tga +++ b/src/tga @@ -1 +1 @@ -Subproject commit 90f54d1100840b4c82f4d289fc9a8ae209ccc59c +Subproject commit d821575f5284d56429909fc4c69579562d06a4f6