diff --git a/lib/gdi/picload.cpp b/lib/gdi/picload.cpp index 8833ab95b5..34d02e9bc2 100644 --- a/lib/gdi/picload.cpp +++ b/lib/gdi/picload.cpp @@ -417,7 +417,7 @@ static void png_load(Cfilepara* filepara, int background, bool forceRGB=false) filepara->transparent = (trans_alpha != NULL); } - if ((bit_depth <= 8) && (color_type == PNG_COLOR_TYPE_GRAY || color_type & PNG_COLOR_MASK_PALETTE)) + if ((bit_depth <= 8) && (color_type == PNG_COLOR_TYPE_GRAY || color_type & PNG_COLOR_MASK_PALETTE || color_type == PNG_COLOR_TYPE_RGBA)) { if (bit_depth < 8) png_set_packing(png_ptr);