pexif project moved

Sun, 30 Jun 2013 12:14:38 +0000
tech python pexif

My Python EXIF parsing library is joining the slow drift of projects away from Google code to Github. If you are intertested in contributing please send pull requests and I'll attempt to merge things in a timely manner.

As you can probably tell from the commit log, I haven’t really been actively working on this code base for a while, so if anyone out there feels like maintaining, please just fork on github, let me know, and I’ll point people in your direction.

pexif 0.13 release

Thu, 23 Apr 2009 11:19:06 +0000
tech code pexif python

pexif is the python library for editing an image’s EXIF data. Somewhat embarrassingly, the last release I made (0.12) had a really stupid bug in it. This has now been rectified, and a new version (0.13) is now available.

pexif 0.11 released

Thu, 27 Mar 2008 13:22:11 +0000
pexif code python tech

I released a new version of pexif today. This release fixes some small bugs and now deals with files containing multiple application markers. This means files that have XMP metadata now work.

Now I just wish I had time to actually use it for its original purpose of attaching geo data to my photos.

More code uploaded..

Thu, 09 Feb 2006 09:32:16 +0000
pexif tech python

Ok, pexif 0.4 is out (even after saying th other day that I wouldn't do any more releases for a while!), and I've updated the pyannodex 0.7.3 tarball to include a missing header file. (I didn't really think that deserved a version bump!).

Another day.. another pexif release

Mon, 06 Feb 2006 22:50:18 +0000
tech python pexif

pexif hits 0.3. Ok, there is now an easy way to get and set GPS coordinates on a photo, which was really my aim in writing this library in the first place. There is also a and script to do it on the command line.

I don't plan on doing any more major stuff to this library in the near future unless someone other than me is actually using it, so more than likely this will be the final pexif release. Itch scratched.

pexif 0.2 released

Sun, 05 Feb 2006 22:06:35 +0000
tech pexif python
I just released pexif 0.2 which handles JFIF files as well as just EXIF and has a slightly saner interface as well as an actual test suite, and documentation. Still probably not useful for general audience, but if any one is keen take a look.

pexif 0.1 release

Fri, 27 Jan 2006 18:46:27 +0000
tech pexif python

Short version: I release some code. It edits EXIF data.

Long version: All I wanted to do was write some simple code to add a GPS location take to my photos. It should have been easy. A couple of hours of scripting at the most. But it wasn't.

Most JPEG images have some meta data at the front of them telling you stuff like, when it was taken, what camera took it, wether the flash was used, and so on, and so on. The latest version of the spec also has a bunch of fields for storing GPS information. Unfortunately my cheapo camera doesn't store that kind of information, so I want to add it in after the fact. I thought I could just grab an existing EXIF editing library and away I would go.

Unfortunately the two Python libraries out there pyexif and, only handle the parsing of EXIF data, not the updating of it. The also seemed to be a C library libexif that claimed to do editing, but it was basically undocumented, I couldn't work out how to use it, and besides I wanted to write in python not C. (And I didn't feel like writing a Python wrapper for a library I didn't uderstand.)

This led me to writing some of my own Python code to try and just do enough to insert the GPS tags and nothing else. Unfortunately the way EXIF works things aren't quite that easy. Inside the file format you end up with internal offset pointers, which means if you change the layout (by inserting some extra tags), you end up needing to change all these pointers to work with the new offsets.

I thought this wouldn't be too bad because I'd just append to the end of the section I was working with, (which was unfortuantely first), and then the other sections could move freely. Unfortuantely these pointers don't reference from the start of a section, they reference from the start of the file. This basically means that I need to parse everything into memory, and then know how to write it all back out again. Pain, pain, pain. (This was of course a bit of a simplication, so please don't email me saying that isn't exactly how EXIF is structured.)

Anyway, I now have a library, which can read all the EXIF data, including the thumbnail section, edit and insert values into it, and then spit out a valid file again. Now I can start writing the code to do the actual tagging, which should be more interesting than this stuff, but right now, time for the LCA dinner.