[Image-SIG] EXIF tag reading fails for minimal tagged images
Kurt Schwehr
schwehr at ccom.unh.edu
Sat Apr 18 14:41:28 CEST 2009
This is with python 2.6, pil 1.1.6 on mac osx 10.5.6 with fink python/pil
wget
http://schwehr.org/blog/attachments/2009-04/20090201-1601-with-exif-gps.jpeg
ipython
import Image
im = Image.open('20090201-1601-with-exif-gps.jpeg')
In [29]: im._getexif()
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
/Users/schwehr/projects/src/healy/<ipython console> in <module>()
/sw/lib/python2.6/site-packages/PIL/JpegImagePlugin.pyc in _getexif(self)
352 exif[key] = fixup(value)
353 # get exif extension
--> 354 file.seek(exif[0x8769])
355 info = TiffImagePlugin.ImageFileDirectory(head)
356 info.load(file)
KeyError: 34665
However, jhead works...
jhead 20090201-1601-with-exif-gps.jpeg
File name : 20090201-1601-with-exif-gps.jpeg
File size : 116441 bytes
File date : 2009:04:16 07:17:11
Resolution : 1280 x 960
GPS Latitude : N 43d 12m 59.998s
GPS Longitude: W 123d 1m 12s
Comment : Sun Feb 01 16:00:32 2009
More information about the Image-SIG
mailing list