Remove non-GRAY ICC profiles from grayscale JPG files #176
Loading…
Reference in a new issue
No description provided.
Delete branch "leoleozhu/img2pdf:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have found additional cases for josch/img2pdf#175.
In this pull request, the non-GRAY ICC profiles will be removed for Grayscale JPG files.
You can find more information and references to support this change:
• The Pillow CmsProfile documentation [https://pillow.readthedocs.io/en/stable/reference/ImageCms.html#PIL.ImageCms.CmsProfile.xcolor_space]
• The ICC.1:2010 specification, specifically section 7.2.6 Data colour space field (bytes 16 to 20) [https://www.color.org/specification/icc1v43_2010-12.pdf]
While I’m not an expert on color profiles, it seems that the only possible ICC profile for grayscale jpg files is ‘GRAY’.