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

Expose zune-jpeg's Exif chunk extraction #2291

Merged
merged 4 commits into from
Aug 26, 2024
Merged

Conversation

Shnatsel
Copy link
Contributor

Carbon copy of the ICC chunk handling, but for Exif.

Required for wondermagick so that we could rotate the JPEGs correctly based on metadata.

In the long term we probably want to integrate kamadak-exif, since it doesn't have any unsafe code and seems to be in quite a good shape. But this PR seems like a simple and uncontroversial start.

@Shnatsel
Copy link
Contributor Author

The single failing CI job seems to be unrelated to this change.

@Shnatsel
Copy link
Contributor Author

Shnatsel commented Jul 26, 2024

In theory PNG and WebP images can have Exif metadata too. Do you want me to make this a method on ImageDecoder with a default impl that just returns None?

Update: I went ahead and moved it to the Decoder trait with a default impl to preserve semver compatibility. The API is much nicer to use that way.

@Shnatsel

This comment was marked as outdated.

@Shnatsel Shnatsel marked this pull request as draft July 27, 2024 16:44
@Shnatsel Shnatsel marked this pull request as ready for review July 27, 2024 17:43
@Shnatsel
Copy link
Contributor Author

nvm I figured it out, this works and is ready for review

Copy link
Contributor

@fintelia fintelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The image-webp crate also already supports this functionality.

@Shnatsel
Copy link
Contributor Author

Nice! I'll try to add that later, but I'd appreciate a merge of this as-is so that the PR doesn't stall.

@fintelia fintelia merged commit a804647 into image-rs:main Aug 26, 2024
31 of 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.

2 participants