radiant: redo 6011367, fix alpha channel for tRNS cheap transparency PNG 158/head
authorThomas Debesse <dev@illwieckz.net>
Sat, 7 Dec 2019 03:38:39 +0000 (04:38 +0100)
committerThomas Debesse <dev@illwieckz.net>
Sat, 7 Dec 2019 04:09:02 +0000 (05:09 +0100)
plugins/imagepng/plugin.cpp

index 281193f..4bdf2b0 100644 (file)
@@ -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;