Skip to content

Commit

Permalink
Only write the gAMA chunk if the sRGB chunk is written too. However, …
Browse files Browse the repository at this point in the history
…write the gAMA chunk if gamma is not 1.0/2.2 and no sRGB chunk (#5850)
  • Loading branch information
Cristy committed Dec 5, 2022
1 parent b21075c commit b516099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coders/png.c
Original file line number Diff line number Diff line change
Expand Up @@ -11117,7 +11117,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
{
if (ping_exclude_gAMA == MagickFalse &&
ping_have_iCCP == MagickFalse &&
ping_have_sRGB == MagickFalse &&
ping_have_sRGB != MagickFalse &&
(ping_exclude_sRGB == MagickFalse ||
(image->gamma < .45 || image->gamma > .46)))
{
Expand Down

0 comments on commit b516099

Please sign in to comment.