Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Nov 19, 2022

Helps #6641 by adding "named constants for common IFDs".

Adds the following to ExifTags.

class IFD(IntEnum):
    Exif = 34665
    GPSInfo = 34853
    Makernote = 37500
    Interop = 40965

I updated other parts of Pillow's code to use these new constants internally. In doing so, I found

if tag in [0x8769, 0x8225, 0x8825] and not isinstance(value, dict):

I can only imagine that 0x8225 was a typo when I added it in 4b14f01, so I'm removing it here.

Resolves #6777 by adding IFD.IFD1 as well, so that IFD1 data can be read, and then modifying get_child_images() to make use of IFD1 data to read thumbnails through the "ThumbnailOffset in IFD1".

@hugovk hugovk added the automerge Automatically merge PRs that are ready label Dec 13, 2022
@radarhere radarhere merged commit 5257d56 into python-pillow:main Dec 13, 2022
@radarhere radarhere deleted the exif_ifd branch December 13, 2022 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge PRs that are ready Exif

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting IFD1 exif information

2 participants