PIL is an excellent image processing library, but unfortunatly not a tool of choice when you want to deal with EXIF data seriously.<br><br>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).<br>
<br>And beware, EXIF (as well as other metadata standards like IPTC) is full of &quot;dead tags&quot; that are only written by some exotic image processing applications or camera models.<br><br>In your special case (&quot;finding a title for a photo&quot;), I&#39;d resort to IPTC:Caption - this is where Photoshop/Lightroom/Google Picasa and many other image processing apps store &quot;title&quot; information.<br>
<br>Franz<br><br><div class="gmail_quote">2009/5/22 Luke Hutscal <span dir="ltr">&lt;<a href="mailto:luke@liftinteractive.com">luke@liftinteractive.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><font size="3" face="arial"><span style="font-size: 13px;"><font size="3" face="Helvetica"><span style="font-size: 12px;">Hello, all.</span></font></span></font></p>

<p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><br></p><p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
I am currently working on a Django application that stores photos as users upload them.</p>
<p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><br></p><p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
One of the cooler features that we&#39;d like to add is automatic EXIF reading - so instead of users having to go through and update their photo&#39;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.</p>

<p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><br></p><p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
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 &quot;title&quot; attribute is missing. Here&#39;s an example of what _getexif() returns:</p>

<p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><br></p><p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</p><p style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><a href="http://liftslice3.com/getexif.txt" target="_blank">http://liftslice3.com/getexif.txt</a></p>

<div><br></div><div>However, when I run ExifTool(<a href="http://www.sno.phy.queensu.ca/%7Ephil/exiftool/" target="_blank">http://www.sno.phy.queensu.ca/~phil/exiftool/</a>) on the image with the -d flag, this is what is output:</div>
<div>
<br></div><div><div><a href="http://liftslice3.com/exiftool.txt" target="_blank">http://liftslice3.com/exiftool.txt</a></div><div><br></div><div>As you can see, there&#39;s definitely a title attribute present on the image in question. I took a look at the EXIF tags list at <a href="http://www.element-it.com/StandardImageTags.ASPX" target="_blank">http://www.element-it.com/StandardImageTags.ASPX</a>, and noticed that the ImageTitle EXIF tag isn&#39;t present in PIL&#39;s ExifTags.py - is there a reason for this? I tried adding a key for 0x0320 with the value &quot;ImageTitle&quot; to the TAGS dict, but PIL still doesn&#39;t seem to be reading the ImageTitle attribute out of my images. </div>

<div><br></div><div>Is there something I&#39;ve missed that is keeping PIL from reading the title attribute?</div><div><br></div><div>Thanks,</div><div><br></div><font color="#888888"><div>Luke</div></font></div><p></p>
<br>_______________________________________________<br>
Image-SIG maillist  -  <a href="mailto:Image-SIG@python.org">Image-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/image-sig" target="_blank">http://mail.python.org/mailman/listinfo/image-sig</a><br>
<br></blockquote></div><br>