From: Thomas Debesse Date: Sun, 15 Jul 2018 18:44:12 +0000 (+0200) Subject: radiant: fix alpha channel for palette-with-transparency png X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6011367;p=xonotic%2Fnetradiant.git radiant: fix alpha channel for palette-with-transparency png --- 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;