[Tutor] trying to get data from digital camera.jpg file
with EXIF.py
Kent Johnson
kent_johnson at skillsoft.com
Wed Aug 11 16:33:40 CEST 2004
Try opening the file in binary mode, that is what exiftool does:
file = open('temp.jpg', 'rb')
Kent
At 09:18 AM 8/11/2004 -0400, John Matthews wrote:
>I read this list each day and find it quite informative and enjoyable.
>Thanks tutors!
>
>I am a beginning programmer and I am trying to use EXIF to get the "Image
>DateTime" from my .jpg files for a little program I am writing that makes
>web pages for my family photos.
>
>I am trying to use EXIF.py by Gene Cash. He also has written exiftool.py,
>and both of these files are available here:
>
>http://home.cfl.rr.com/genecash/digital_camera.html
>
>Just messing around at the interpreter I do something like this and get
>what appears to be an empty dictionary.
>
>import EXIF, os
>file = open('temp.jpg')
>data = EXIF.process_file(file)
>print data
> >>>
>{}
>
>I thought that would dump the same data I get at the command prompt when I do:
>
>exiftool.py -v temp.jpg
>
>but I must be way off. If someone can offer me a pointer I would really
>appreciate it!
>
>Thanks!
>--
>John Matthews
>McDonald, Cassell & Bassett, Inc.
>600 West Spring Street
>Columbus, Ohio 43215
>(614) 628-0630
>(614) 628-0633 Fax
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list