-
-
Notifications
You must be signed in to change notification settings - Fork 887
PNG: Ignore invalid gamma chunks #2021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What does libpng do in this situation? Gamma chunk is not mandatory and can use default values in certain situations. |
I think you are right, its not mandatory. libpng only shows a warning, but decodes the image. libpng output: Click to expand!Testing libpng version 1.6.38.git with zlib version 1.2.11libpng version 1.6.38.git Testing length_gama.png: length_gama.png: 1 libpng warnings found length_gama.png: libpng warning: gAMA: invalid Pass 0: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw length_gama.png: libpng warning: gAMA: invalid length_gama.png: 3 libpng warnings found PASS (4 zero samples) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Prerequisites
Description
This PR handles another edge case when the gamma chunk does not contain enough data.