From 11eb1d7c769ae018e49b0b62eae147c6a6c6edf5 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sat, 7 Dec 2019 04:38:39 +0100 Subject: [PATCH] radiant: redo 6011367, fix alpha channel for tRNS cheap transparency PNG --- plugins/imagepng/plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/imagepng/plugin.cpp b/plugins/imagepng/plugin.cpp index 281193fd..4bdf2b0a 100644 --- a/plugins/imagepng/plugin.cpp +++ b/plugins/imagepng/plugin.cpp @@ -113,7 +113,7 @@ Image* LoadPNGBuff( unsigned char* fbuffer ){ 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