diff --git a/lib/gdi/picload.cpp b/lib/gdi/picload.cpp index 6097b72bfec..80aeb9bc560 100644 --- a/lib/gdi/picload.cpp +++ b/lib/gdi/picload.cpp @@ -412,7 +412,7 @@ static void png_load(Cfilepara *filepara, unsigned int background) 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);