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

Support TIFF width and height in u16 #19

Merged
merged 2 commits into from
Sep 24, 2022

Conversation

gyk
Copy link
Contributor

@gyk gyk commented Sep 22, 2022

If the width and height IFD entries of a TIFF file are big-endian 16-bit integers, the current implementation will return wrong results. Examples: 1, 2, 3.

This PR tries to fix this problem, using image-tiff's ifd mod as a reference.

@Roughsketch Roughsketch self-requested a review September 23, 2022 18:25
Copy link
Owner

@Roughsketch Roughsketch left a comment

Choose a reason for hiding this comment

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

I went ahead and added a test case with one of the examples you posted. Tests pass and it looks good to me, so I'll try to get a patch version out here soon.

Thanks for the PR!

@Roughsketch Roughsketch merged commit 28d0d20 into Roughsketch:master Sep 24, 2022
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