[Tutor] Obtaining image date of creation

Marc Tompkins marc.tompkins at gmail.com
Wed Nov 14 20:16:16 CET 2007


Thus spake Roy Chen:

> Hello,
>
> I would like to write a simple script that would rename a bunch of
> photos according to their creation date, i.e. the date which the
> photo was taken.
>
> Is there a way to use Python to obtain that information from the
> image file, or is that information not stored in the file?
>

What you're looking for is called EXIF, which stands for Exchangeable Image
File Format.
A good place to start would be http://www.exif.org  (or maybe Google, now
that you know the name of the format...)
Without having researched very far, I would guess that a lot of the familiar
MP3 tag-manipulation routines floating around out there could be easily
modified to read EXIF data instead - or, perhaps there are already Python
EXIF libraries?

Have fun with that!


-- 
www.fsrtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071114/17a1acf6/attachment.htm 


More information about the Tutor mailing list