#!/usr/bin/python3 # ==================================================================== # As of Pillow 6.0, EXIF data can be read from PNG images. However, # unlike other image formats, EXIF data is not guaranteed to be # present in info until load() has been called. # ==================================================================== from PIL import Image filename = './faces/tj_01.png' im = Image.open(filename) im.load() # Needed only for .png EXIF data (see citation above) print(f'type(im) = {type(im)}') print(f'type(im.info) = {type(im.info)}') print(f'im.info') for k,v in im.info.items(): print(f' {k:5} : {v}')