Skip to content

Commit

Permalink
[Fixed] Wrong handling of 8bit images
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarCC committed Oct 15, 2024
1 parent 322583f commit 630d1bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gdi/picload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 630d1bc

Please sign in to comment.