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

Add Follower IFD check for multipage tiff files #83

Merged
merged 2 commits into from
Jan 15, 2017
Merged

Add Follower IFD check for multipage tiff files #83

merged 2 commits into from
Jan 15, 2017

Conversation

kwhopper
Copy link
Collaborator

drewnoakes/metadata-extractor#223

  • Bug fix in ExifDescriptorBase for a missing subfiletype description.
  • Added Page Number (0x0129) tag to ExifDescriptorBase
  • First go at detecting and displaying multipage tiff images

The problems I see with this PR:

  • The new check in HasFollowerIfd() isn't based on a concrete way of knowing it's an 'image' that I can find so far. It's mostly intuition that the page number tag won't exist in other cases.
  • Adding additional ExifIfd0Directory's was my first solution. That seemed wrong since these aren't IFD0 and instead created a new directory (ExifImageDirectory). I can't say either way whether that's a good solution, better name, etc.
  • Using "PushDirectory" in this case can create a very long indented output of the structure

It makes significant additions (and corrections actually) to the images repo -- a number of TIFF's were multipage but being loading into Thumbnail directories. Let me know what you think.

@drewnoakes
Copy link
Owner

This looks solid and I'd like to give it a proper look over, but won't have time to do so until this weekend. Thanks for the thorough description too.

Do you think there's a case for introducing a different TiffHandler implementation for TIFF/RAW files, as opposed to Exif?

@drewnoakes
Copy link
Owner

Nice bug fix on the New Subfile Type tag! Makes a lot more sense now :)

The PageNumber check looks good. Perhaps the subfile type tag could indicate the directory type, though we don't get around to reading its values until after we have chosen the directory type. That'd require a bit of a redesign. In theory, it should differentiate well between a reduced resolution image and a single page of multi-page image. What you've come up with seems to work well on a wide range of images, and is undoubtedly superior to what was there before.

@drewnoakes drewnoakes merged commit a15147b into drewnoakes:master Jan 15, 2017
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.

None yet

2 participants