Closed claudiaximenaro closed 3 years ago
pyexiv2 supports reading and writing Exif, IPTC amd XMP metadata from PNG images. For example:
leo@Leo:/mnt/d$ python3
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyexiv2
>>> img = pyexiv2.Image('1.png')
>>> img.modify_exif({'Exif.Image.Artist': 'TEST'})
>>> img.read_exif()
{'Exif.Image.Artist': 'TEST'}
>>> img.modify_iptc({'Iptc.Application2.ObjectName': 'TEST'})
>>> img.read_iptc()
{'Iptc.Application2.ObjectName': 'TEST'}
You can try to read images with exiv2.
Thank you. Indeed pyexif2 supports png files, the problem seems to come from the photos that are very dated (2010) and at that time PNG didn't have a formal EXIF chunk, so what I am seeing with exiftool is actually the information coming from the xmp data that was added later.
This issue has been automatically closed because there has been no activity for a month.
Hi, I have a problem with reading the exif and iptc data from *.png files. When I use Exiftool, I can see that the information is there, however when I use pyexiv2 my exif/iptc data dictionaries are empty, it only happens with png files, for the rest (jpg,tiff,) it works.