叮当猫咪
我用这个:import os,sysfrom PIL import Imagefrom PIL.ExifTags import TAGSfor (k,v) in Image.open(sys.argv[1])._getexif().iteritems():
print '%s = %s' % (TAGS.get(k), v)或者获取特定字段:def get_field (exif,field) :
for (k,v) in exif.iteritems():
if TAGS.get(k) == field:
return v
exif = image._getexif()print get_field(exif,'ExposureTime')