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

Added reading of IFD tag type #4979

Merged
merged 1 commit into from Oct 14, 2020
Merged

Added reading of IFD tag type #4979

merged 1 commit into from Oct 14, 2020

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Oct 14, 2020

Helps #4940

Pages 15-16 of the TIFF specification list tag types from 1-12. It also states that

Warning: It is possible that other TIFF field types will be added in the future. Readers should skip over fields containing an unexpected field type.

However, the image from the issue has a tag of type 13. Why? It is instead following TIFF Specification Supplement 1 which lists 13 as the type for a 'New Tag' on page 4. It describes it as

TIFF data type 13, “IFD,” is otherwise identical to LONG, but is only used to
point to other valid IFDs.

At the moment, as it is an unknown tag type, it is simply skipped by TiffImagePlugin.

So this PR adds IFD as a tag type, read in the same way as a LONG.

@hugovk hugovk added the TIFF label Oct 14, 2020
@hugovk hugovk merged commit 04f1b38 into python-pillow:master Oct 14, 2020
@radarhere radarhere deleted the ifd branch October 16, 2020 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants