From 6011367844c51d4805528385f7f91d2eb36299eb Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sun, 15 Jul 2018 20:44:12 +0200 Subject: [PATCH] radiant: fix alpha channel for palette-with-transparency png --- plugins/imagepng/plugin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/imagepng/plugin.cpp b/plugins/imagepng/plugin.cpp index 8a9f582d..65ae5950 100644 --- a/plugins/imagepng/plugin.cpp +++ b/plugins/imagepng/plugin.cpp @@ -114,9 +114,7 @@ Image *LoadPNGBuff(unsigned char *fbuffer) if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { png_set_tRNS_to_alpha(png_ptr); - } - - if (!(color_type & PNG_COLOR_MASK_ALPHA)) { + } else if (!(color_type & PNG_COLOR_MASK_ALPHA)) { // Set the background color to draw transparent and alpha images over. png_color_16 my_background, *image_background; -- 2.39.2