How to get Exif data from a jpeg file
Arnaud Delobelle
arnodel at googlemail.com
Sun May 17 04:17:06 EDT 2009
Daniel Fetchinson <fetchinson at googlemail.com> writes:
>> I need to get the creation date from a jpeg file in Python. Googling
>> brought up a several references to apparently defunct modules. The best
>> way I have been able to find so far is something like this:
>>
>> from PIL import Image
>> img = Image.open('img.jpg')
>> exif_data = img._getexif()
>> creation_date = exif_data[36867]
>>
>> Where 36867 is the exif tag for the creation date data (which I found by
>> ooking at PIL.ExifTags.TAGS). But this doesn't even seem to be
>> documented in the PIL docs. Is there a more natural way to do this?
>
>
> Have you tried http://sourceforge.net/projects/exif-py/ ?
>
> HTH,
> Daniel
I will have a look - thank you.
--
Arnaud
More information about the Python-list
mailing list