Help getting extended EXIF ingo

13 views
Skip to first unread message

Dave Sinclair

unread,
Oct 29, 2012, 9:20:20 AM10/29/12
to pexif...@googlegroups.com
Firstly thanks for making a exif library that works across different platforms and python versions. So far I've been through pyexiv2, exif.py and more to try and find something that can work on different systems.

I'm having some trouble getting the DateTimeOriginal from jpeg images. 

Using the following I can get the date modified info:

jpeg = pexif.JpegFile.fromFile(photoFile)
exif = jpeg.get_exif()
primary = exif.get_primary()
print exif.primary.DateTime

But I can't figure out how to get the 'Date of digital data generation' that shows up using jpeg.dump(), I've tried a lots possibilities like exif.primary.DateTimeOriginal and tens more, but having no luck. I'm sure I'm missing something very simple but can't work it out so any help would be really appreciated. 

D

Ben Leslie

unread,
Jun 29, 2013, 10:33:42 PM6/29/13
to Dave Sinclair, pexif...@googlegroups.com
Hi Dave,

I'm sure that given this email is almost a year old you've either
given up or worked this out for yourself, but for posterity, I think
that the attribute you are after is:

primary.ExtendedEXIF.DateTimeOriginal

I've added an example `scripts/dump_timestamp.py` that shows how to use this.

Note: Source is now available on github -- https://github.com/bennoleslie/pexif

Cheers,

Benno
> --
> You received this message because you are subscribed to the Google Groups
> "pexif.users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pexifusers/-/9n9euA2Kb6MJ.
> To post to this group, send email to pexif...@googlegroups.com.
> To unsubscribe from this group, send email to
> pexifusers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pexifusers?hl=en.
Reply all
Reply to author
Forward
0 new messages