Skip to content

PNG and TIFF XMP #5531

@trougnouf

Description

@trougnouf

What did you do?

Download a PNG file with exif data, for example https://commons.wikimedia.org/wiki/File:Ares_Tower_Vienna_from_SW_on_2015-07-10.png (direct link: https://upload.wikimedia.org/wikipedia/commons/5/5c/Ares_Tower_Vienna_from_SW_on_2015-07-10.png )

from PIL import Image
infpath = 'Ares Tower Vienna from SW on 2015-07-10.png'
pilimg = Image.open(infpath)
exifdata = pilimg._getexif()

What did you expect to happen?

exifdata[34855] == 100 # ISO sensitivity

See alse: #3674

What actually happened?

exifdata is None.

pilimg.info has the following keys: ['dpi', 'icc_profile', 'XML:com.adobe.xmp', 'chromaticity']; XML:com.adobe.xmp contains all of the info, but it is a very messy xml string.

What are your OS, Python and Pillow versions?

  • OS: Arch Linux
  • Python: 3.9.5
  • Pillow: 8.2.0

On a side note I can't get exif info directly from a tiff file either, _getexif() then raises an AttributeError. egfile: https://commons.wikimedia.org/wiki/File:Book_of_Hours_(Use_of_Metz)_Fol._27r,_Decorated_Initials.tif (direct: https://upload.wikimedia.org/wikipedia/commons/1/16/Book_of_Hours_%28Use_of_Metz%29_Fol._27r%2C_Decorated_Initials.tif )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions