Reading EXIF data from photo
I plan to write a simple app that puts a datetime stamp to a photo based on its EXIF data. So far I haven't found a way to read the EXIF data, especially using Pythonista. Can anybody give me a light on this? Thank you.
Dann239 last edited by
Check out the Photos module in the Pythonista documents. More specifically, photos.get_metadata.
JonB last edited by
You can use the included in PIL module:
_getexif()attribute might not exist if you opened a gif or png. Threw me off when I first tried this, since apparently screenshots in ios are taken as png, but named jpg, and that's what I had lying around in my pythonista folder.
If the photo doesn't have exif data, can I take the data from the file info e.g. datetime of file creation? Is there any python function to read it? Not the datetime of last file modification but the true file creation.
dgelessus last edited by
Theoretically you could use the
stat()function to check the creation date, though I don't know if it is accurate with photos imported from the camera roll.
ccc last edited by
Code from your filenav would make it easy to do some experiments.
techteej last edited by
Did you look at this yet?
Thank you for providing link to other projects. filenav seems pretty cool. I'll start with that. :)