Message195715
With this Python program and 20070517-152405_lovers_4 (copie).jpg (this file is ok whith Gimp and others programs).
Program "freeze" ( line print "Done" is not processing).
---------------------------------------------
from PIL import Image
from PIL.ExifTags import TAGS
def get_exif(fn):
ret = {}
i = Image.open(fn)
info = i._getexif()
for tag, value in info.items():
decoded = TAGS.get(tag, tag)
ret[decoded] = value
return ret
get_exif("./20070517-152405_lovers_4 (copie).jpg")
print "Done"
---------------------------------------------
Console output :
Traceback (most recent call last):
File "pil_exif.py", line 14, in <module>
get_exif("./20070517-152405_lovers_4 (copie).jpg")
File "pil_exif.py", line 7, in get_exif
info = i._getexif()
File "/usr/lib/python2.7/dist-packages/PIL/JpegImagePlugin.py", line 381, in _getexif
info.load(file)
File "/usr/lib/python2.7/dist-packages/PIL/TiffImagePlugin.py", line 348, in load
for i in range(i16(fp.read(2))):
File "/usr/lib/python2.7/dist-packages/PIL/TiffImagePlugin.py", line 68, in il16
return ord(c[o]) + (ord(c[o+1])<<8)
IndexError: string index out of range
------------------------------------
------------------------------------
Linux Mint : Linux mystation 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux
Python : 2.7.3rc2 (no additional lib installed)
TiffImagePlugin.py : __version__ = "1.3.5" |
|
Date |
User |
Action |
Args |
2013-08-20 20:33:44 | lolo27 | set | recipients:
+ lolo27 |
2013-08-20 20:33:44 | lolo27 | set | messageid: <1377030824.64.0.335322556531.issue18791@psf.upfronthosting.co.za> |
2013-08-20 20:33:44 | lolo27 | link | issue18791 messages |
2013-08-20 20:33:44 | lolo27 | create | |
|