-
Notifications
You must be signed in to change notification settings - Fork 618
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
Opening and saving an sRGB image yields different colors #2247
Comments
Could you share a failing image? Is it possible there's an embedded ICC profile and we have a longstanding issue to handle those better |
I was using the full resolution download of this flickr image: https://flickr.com/photos/alexislours/53637525879/ I believe it does have an embedded ICC profile |
Reading through the linked issue, and the other issues around it… is there currently a work around or are embedded ICC profiles a no-go for now with image-rs? |
We have the low level capability to read ICC profiles, but aren't yet able to write them when encoding images |
Ah, so the correct thing would be to read the profile, apply it, then save in a format image-rs supports. Thanks! |
I someone needs it now, mozjpeg has the functionnality. One could read the profile using image-rs and write it using mozpeg: https://docs.rs/mozjpeg/latest/mozjpeg/compress/struct.CompressStarted.html#method.write_icc_profile |
#2322 just added support for writing ICC profiles when producing WebP images. |
This happens in image 0.25.1
Expected
Colors should be preserved when an image is opened and saved.
Actual behaviour
Two different images with different colors (after image opened and saved, it’s much more yellow)
Reproduction steps
Take an sRGB IEC61966-2.1 encoded jpeg, open it with Reader, call the save method on the result, and compare the before and after images. Looking at meta data, it preserves the sRGB color profile, but the result is different colors.
Provide source code, a repository link, or steps:
The text was updated successfully, but these errors were encountered: