Skip to content
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

feature: support writing ICC color profiles #237

Open
lovasoa opened this issue Oct 14, 2024 · 3 comments
Open

feature: support writing ICC color profiles #237

lovasoa opened this issue Oct 14, 2024 · 3 comments

Comments

@lovasoa
Copy link

lovasoa commented Oct 14, 2024

Hello and thank you for this great library !

Issue: Currently, the image crate does not support writing ICC color profiles when encoding images. This can result in color inaccuracies or distortions.

Upstream issue:

Why ICC Profile Support Is Important: ICC (International Color Consortium) profiles define how colors should be interpreted by devices such as monitors, printers, and software. Without embedding an ICC profile in an image, there is no guarantee that the colors in the image will be displayed correctly. Generally images will be interpreted as sRGB by default, instead of the actual color palette of the image.

By supporting the writing of ICC profiles during image encoding, the image crate could ensure that images are displayed as intended across all platforms, and that opening reading an image and writing it back does not distort its colors.

Requested Feature: Add support for embedding ICC profiles when saving images to ensure color fidelity and consistency.

@etemesi254
Copy link
Owner

Hi, which formats specifically?

@lovasoa
Copy link
Author

lovasoa commented Oct 20, 2024

The full specification for ICC color profile encoding is available here: https://www.color.org/specification/ICC.1-2022-05.pdf

But it doesn't need to be implemented in this library. Ideally, zune-jpeg would simply provide something like fn set_icc_profile(&mut self, profile: &[u8]). And users would pass profiles either created by other libraries or (more likely) extracted from the original image with ImageDecoder::icc_profile from image-rs.

@etemesi254
Copy link
Owner

etemesi254 commented Oct 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants