Skip to main content

A great way to get IPTCInfo

Project description

Build Status

Like IPTCInfo but finally compatible for Python 3

Ported from Josh Carter’s Perl IPTCInfo-1.9.pm by Tamas Gulacsi

Ever wish you add information to your photos like a caption, the place you took it, the date, and perhaps even keywords and categories? You already can. The International Press Telecommunications Council (IPTC) defines a format for exchanging meta-information in news content, and that includes photographs. You can embed all kinds of information in your images. The trick is putting it to use.

That’s where this IPTCInfo Python module comes into play. You can embed information using many programs, including Adobe Photoshop, and IPTCInfo will let your web server – and other automated server programs – pull it back out. You can use the information directly in Python programs, export it to XML, or even export SQL statements ready to be fed into a database.

Usage

from iptcinfo3 import IPTCInfo

Create new info object info = IPTCInfo('doge.jpg')

Print list of keywords, supplemental categories, contacts print(info['keywords']) print(info['supplementalCategories']) print(info['contacts'])

Get specific attributes… caption = info['caption/abstract']

Create object for file that may not have IPTC data info = IPTCInfo('such_iptc.jpg', force=True)

Add/change an attribute info['caption/abstract'] = 'Witty caption here' info['supplemental category'] = ['portrait']

Save new info to file info.save() info.save_as('very_meta.jpg')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for IPTCInfo3, version 2.1.4
Filename, size File type Python version Upload date Hashes
Filename, size IPTCInfo3-2.1.4-py3-none-any.whl (12.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size IPTCInfo3-2.1.4.tar.gz (12.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page