Gheorghe Milas

Gheorghe Milas

About me

jpeg.py ver. 0.1.5

A python library to parse, read and write JPEG EXIF, IPTC and COM metadata.

What is it

  • The module is part of my web personal media cataloging application WCatalog

  • Read/ Write JPEG Exif segment type metadata

    This program will never try to achieve completeness, for example photo camera maker notes altow parsed for some comera's (olympus, canon) will probably never really be fully parsed. The way the program parses them is in "raw" format so that it can write them back in to the file corectly, meaning that it creates a class with tags and their values but there is no mapping to the acual meaning of the tags (attribute parsedMakerNotes ), except for a few camera's I actualy need that info myself and I found usefull to do it (I would very much welcome any contributions) like my canon and olympus cameras (attribute makerNotes).

    Attention! there are cameras that use a proprietary (not exif like) method of structuring the maker notes (like kodak camera's) and in their case there are very big chances that the maker notes will be corupted after this program writes a new exif in to them.

    For more exhaustive maping of maker notes you should use EXIF.py or pyExif or if python is not a neccesity for you then there is a very good perl module exiftool.

    However neither of the python modules can write data back into the image and as far as I know there is not a lot of programs to chose from that are open source and can do it. There are a few like the perl exiftool or exiv2, a C++ library for Exif and IPTC, which looks like a mature library. I'm looking forward for someone to port it to python.

  • Read/ Write JPEG IPTC segment type metadata (new in jpeg 0.1.4)

    The iptc module is yet in an alpha state, you should backup your file before using it.

    Some of it's interface may change in the future.

  • Read/write data in the Comments segment of the JPEG.

  • Thumbnail via .thumbnail attribute

  • The user is expected to do some homework if he tries to use the module to write metadata outside of it's existing explicit interface.

    By this I mean that if the user tries to use the generic methods get/set, he will need to know about Exif tag id's and their type (see www.exif.org for specifications)

Download & Install

How it works

  • Simple JPEG Comments

  • EXIF style metadata

  • IPTC style metadata (aka the APP13 area)

Valid XHTML 1.0! Click here to validate current XHTML Valid CSS! Click here to validate current CSS.