-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Cannot emit sRGB-chunk #2782
Comments
That was added here: https://github.com/python-pillow/Pillow/pull/2347/files The spec says:
So, it appears in the spec that the proper set is (iCCP | sRGB) + gAMA + cHRM. It looks like we're getting that exactly backwards. |
What did you do?
I tried to add an sRGB-chunk via PngInfo to the PNG image. (Script at the bottom).
What did you expect to happen?
Note the sRGB chunk at offset 0x00025
What actually happened?
Both outputs were created by
pngcheck -vt <Filename>
What versions of Pillow and Python are you using?
Pillow==4.3.0
affected code is also in the current master branch.Python 3.6.2 using Windows Subsystem for Linux (Windows 10 Build 15063)
I think the error is located at:
https://github.com/python-pillow/Pillow/blob/master/PIL/PngImagePlugin.py#L732
This removes the sRGB-chunk from the list of valid chunks if (and only if) there is no iCCP-chunk given to the save function.
Script that replicates the bug
Significance
Chrome 61 expects images to have a color profile embedded in them. In my case, it is of vital importance that the generated images are being shown using the sRGB color profile.
The text was updated successfully, but these errors were encountered: