Install iptcinfo package:
easy_install iptcinfo
Reading
Add/Edit
But this will not read arbitrary tags, like exiftool will
easy_install iptcinfo
Reading
from iptcinfo import IPTCInfo
info = IPTCInfo('test.jpg')
print info.keywords, info.supplementalCategories, info.contacts
caption = info.data['caption/abstract']
Add/Edit
info = IPTCInfo('test.jpg')
info.data['caption/abstract'] = 'Witty caption here'
info.data['supplemental category'] = ['portrait']
info.save()
info.saveAs('test_out.jpg') # keep original safe
But this will not read arbitrary tags, like exiftool will
Comments
Post a Comment