i'm working on a python script that extracts exif data from png files although i ran into an error i don't know to fix, the error i get: AttributeError: 'PngImageFile' object has no attribute '_getexif'
#! /usr/bin/env python
from PIL import Image
from PIL.ExifTags import TAGS
import sys
if len(sys.argv) == 1:
print "Usage: %s <image file>" % sys.argv[0]
else:
image = sys.argv[1]
for (tag, value) in Image.open(image)._getexif().iteritems():
print "%s = %s" %(TAGS.get(tag), value)
Any help appreciated :)