]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
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 281193fd63afd1208a1d37128912da151b687f77..4bdf2b0a9833d9c1ca7d7d3e902e25f739a4de47 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;