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

Implement writing ICC profiles for JPEG and PNG images. #2389

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

alula
Copy link
Contributor

@alula alula commented Dec 6, 2024

Notes:

  • png crate doesn't actually write ICC profiles at all in latest published version as of writing (0.17.14), however it seems that 0.17.15 will be released soon: image-rs/image-png@10644db

src/codecs/jpeg/encoder.rs Outdated Show resolved Hide resolved
src/codecs/jpeg/encoder.rs Outdated Show resolved Hide resolved
src/codecs/png.rs Show resolved Hide resolved
@alula alula force-pushed the alula/jpeg-png-icc-profile branch from 675dadf to 4a08df0 Compare December 9, 2024 06:56
@Shnatsel
Copy link
Contributor

Shnatsel commented Dec 9, 2024

It should be possible to implement for WebP as well, although that doesn't necessarily have to happen in this PR: https://docs.rs/image-webp/latest/image_webp/struct.WebPEncoder.html#method.set_icc_profile

@fintelia
Copy link
Contributor

fintelia commented Dec 9, 2024

@Shnatsel WebP ICC writing was already added in #2322

@kornelski kornelski force-pushed the alula/jpeg-png-icc-profile branch from 4a08df0 to 9128bec Compare December 16, 2024 12:34
@HeroicKatora
Copy link
Member

CI should be fixed by updating the dependency in Cargo.toml for png to 0.17.11 or 0.17.15 to reflect the new needs. The former of these two should compile as it introduces the new interface, the latter is the version implementing the ICC functionality correctly.

@HeroicKatora HeroicKatora merged commit 2125965 into image-rs:main Dec 16, 2024
32 checks passed
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

Successfully merging this pull request may close these issues.

5 participants