ianare / exif-py

Easy to use Python module to extract Exif metadata from digital image files.
BSD 3-Clause "New" or "Revised" License
831 stars 191 forks source link

Add support for PNG files #159

Closed marcoffee closed 2 years ago

marcoffee commented 2 years ago

Added support for detecting / decoding EXIF on PNG files.

Below are some samples and their results:

sample

{'Image Orientation': (0x0112) Short=Mirrored horizontal then rotated 90 CW @ 18,
 'Image XResolution': (0x011A) Ratio=72 @ 74,
 'Image YResolution': (0x011B) Ratio=72 @ 82,
 'Image ResolutionUnit': (0x0128) Short=Pixels/Inch @ 54,
 'Image YCbCrPositioning': (0x0213) Short=Centered @ 66}

sample_interlaced

{'Image Orientation': (0x0112) Short=Mirrored horizontal @ 18,
 'Image XResolution': (0x011A) Ratio=72 @ 74,
 'Image YResolution': (0x011B) Ratio=72 @ 82,
 'Image ResolutionUnit': (0x0128) Short=Pixels/Inch @ 54,
 'Image YCbCrPositioning': (0x0213) Short=Centered @ 66}