Allow getexif() to access TIFF tag_v2 data #5416
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Helps #4940
The issue expected "To be able to access exif tags of my tiff files".
https://en.wikipedia.org/wiki/Exif#Technical
So at top level, there are two IFDs - Exif and GPS.
Then what should existing method
getexif()
do for a TIFF image?One could argue that it should just get the Exif IFD... but then how do users get to the GPS IFD?
One could then argue that it should return a dictionary with just the Exif and the GPS IFDs.
But don't you feel that users will then start to report that other data is missing? Particularly if a later PR adds the ability to use the
exif
argument when saving TIFFs.I think that the nicest option might be to just provide all the
tag_v2
data togetexif()
. This isn't just a simple clone oftag_v2
though - it also provides access toget_ifd()
-im.getexif().get_ifd(0x8825)
would get the GPS IFD.