Remove non-GRAY ICC profiles from grayscale JPG files #176

Merged
josch merged 1 commits from leoleozhu/img2pdf:main into main 7 months ago

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’.

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’.
josch merged commit 5cd0918d50 into main 7 months ago
The pull request has been merged as 5cd0918d50.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b leoleozhu-main main
git pull main

Step 2:

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff leoleozhu-main
git push origin main
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#176
Loading…
There is no content yet.