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

Removed unwrap and set colour transform with Jpeg compressed tiffs #170

merged 4 commits into from Nov 22, 2022


Copy link

@AlanRace AlanRace commented Aug 2, 2022

This pull request includes better handling of jpeg compressed tiff files. The unwrap is removed, and instead an error (TiffUnsupportedError::UnsupportedJpegFeature) created and propogated back.

This also removes the hacky add_app14segment for setting which colour transform the jpeg-decode crate should expect and decode. Now the new set_color_transform is used based on the PhotometricInterpretation set in the tiff file.

Requires merging of image-rs/jpeg-decoder#254 and image-rs/jpeg-decoder#255 in the jpeg-decoder crate.

This fixes #168

@AlanRace AlanRace marked this pull request as draft August 2, 2022 08:14
Copy link

@AlanRace is this simply pending until image-rs/jpeg-decoder#254 is merged and published in a new jpeg-decoder release?

Copy link
Contributor Author

AlanRace commented Sep 5, 2022

@micahsnyder yes, and the same with image-rs/jpeg-decoder#255. It seems that image-rs/jpeg-decoder#254 is now merged, so just waiting on image-rs/jpeg-decoder#255 now.

@AlanRace AlanRace marked this pull request as ready for review November 22, 2022 13:42
Copy link
Contributor Author

Now that the required changes have been merged into the latest version of jpeg-decoder, I think this is now ready for review.

Copy link

@HeroicKatora HeroicKatora left a comment

Choose a reason for hiding this comment

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

LGTM with regards to the mechanism. Error reporting could be improved.

src/ Outdated Show resolved Hide resolved
src/ Outdated Show resolved Hide resolved
@HeroicKatora HeroicKatora merged commit 6c65e66 into image-rs:master Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Panic decoding malformed tiff
3 participants