[Image-SIG] Reading title EXIF data

Franz Buchinger fbuchinger at gmail.com
Tue Jun 2 14:12:34 CEST 2009

PIL is an excellent image processing library, but unfortunatly not a tool of
choice when you want to deal with EXIF data seriously.

It only extracts a subset of the EXIF-Data contained in an image, for a more
complete library you may want to check pyexiv2 (python wrapper for exiv2).

And beware, EXIF (as well as other metadata standards like IPTC) is full of
"dead tags" that are only written by some exotic image processing
applications or camera models.

In your special case ("finding a title for a photo"), I'd resort to
IPTC:Caption - this is where Photoshop/Lightroom/Google Picasa and many
other image processing apps store "title" information.


2009/5/22 Luke Hutscal <luke at liftinteractive.com>

> Hello, all.
> I am currently working on a Django application that stores photos as users
> upload them.
> One of the cooler features that we'd like to add is automatic EXIF reading
> - so instead of users having to go through and update their photo's
> information again after uploading them, the EXIF data on the uploaded photos
> can get automatically read into certain fields - title, caption, and so on.
> I have been using the Image._getexif() method to retrieve the EXIF data for
> the photos that are being uploaded - but it seems that the "title" attribute
> is missing. Here's an example of what _getexif() returns:
> http://liftslice3.com/getexif.txt
> However, when I run ExifTool(http://www.sno.phy.queensu.ca/~phil/exiftool/<http://www.sno.phy.queensu.ca/%7Ephil/exiftool/>)
> on the image with the -d flag, this is what is output:
> http://liftslice3.com/exiftool.txt
> As you can see, there's definitely a title attribute present on the image
> in question. I took a look at the EXIF tags list at
> http://www.element-it.com/StandardImageTags.ASPX, and noticed that the
> ImageTitle EXIF tag isn't present in PIL's ExifTags.py - is there a reason
> for this? I tried adding a key for 0x0320 with the value "ImageTitle" to the
> TAGS dict, but PIL still doesn't seem to be reading the ImageTitle attribute
> out of my images.
> Is there something I've missed that is keeping PIL from reading the title
> attribute?
> Thanks,
> Luke
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090602/951157fe/attachment.htm>

More information about the Image-SIG mailing list