Add milliseconds to get_date_time() in GExiv2.py
Submitted by Valencia Maintainers
Link to original bug (#712431)
Description
---- Reported by valencia-maint@gnome.bugs 2013-08-08 03:08:00 -0700 ----
Original Redmine bug id: 7316
Original URL: http://redmine.yorba.org/issues/7316
Searchable id: yorba-bug-7316
Original author: Pascal Rapaz
Original description:
Adding milliseconds would be convenient to (re)order images taken in a very short time interval
Related issues: related to gexiv2 - http://redmine.yorba.org/show_bug.cgi?id=7319: Offer composite accessors for commonly-needed information (Open) related to gexiv2 - Feature #7318: GDateTime accessor (Open)
---- Additional Comments From valencia-maint@gnome.bugs 2013-08-29 15:13:00 -0700 ----
History
Comment 1
Updated by Jim Nelson 3 months ago
- Status changed from Open to Invalid
This is Invalid because almost all the date/time fields in common photographic metadata formats don't support precision below one second. EXIF and IPTC do not support millisecond precision at all. XMP does (see http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf re: date/time format) with ISO8601, but only in one particular format that I suspect is rarely used by cameras.
Comment 2
Updated by Pascal Rapaz 3 months ago
- File Selection_001.png added
- File DSC_3786.JPG added
You are certainly right, most "small" cameras probably do not have milliseconds. However, I think a little more professional cameras save milliseconds. I have to show my old Nikon D70 (2004) already recorded this information (see example attached).
For this reason I find it unfortunate that we can not recover the full information as it is stored in the picture
Comment 3
Updated by Jim Nelson 3 months ago
- Status changed from Invalid to Open
Ok -- I've learned something new here.
The EXIF format does support millisecond precision, but as separate fields in the EXIF table. That is, the Exif.Photo.DateTimeOriginal is 2012:07:10 12:39:21 (second precision) but also offers Exif.Photo.SubSecTimeOriginal of 80. Between these two fields, you can glean the date/time taken down to the millisecond. (ExifTool puts this all together as its "composite" metadata; Exiv2 doesn't offer such a facility.)
I guess the question is, should gexiv2 make this available automatically. My answer is a hearty maybe. In essence, the question is asking if gexiv2 should offer "composite" metadata like ExifTool does. The intention of gexiv2 is not to make Exiv2 easy-to-use, but rather to provide a GObject binding for Exiv2, a passthrough so to speak. However, there are things that gexiv2 can assist in, such as making GPS coordinates easier to get and decode, so I could see adding millisecond parsing (especially since this is such a commonly-used purpose of photo metadata libraries). In addition, I want gexiv2 to offer returning data as a GDateTime, not just a string. (I've now ticketed that: #7318.)
In the short term, however, this data is available to you via gexiv2's interface. You could extract the SubSec fields and add them to the date/time object you get from the bindings already.
I'm reopening this ticket since it's a valid question and, if we did offer composite accessors, then this would be one to consider for that.
Comment 4
Updated by Pascal Rapaz 3 months ago
Thank you for your answer and all the details !
As you suggest I will get the SubSec value until a compisite accessor will be available.
Best Regards
Comment 5
Updated by Robert Park 3 months ago
I'm ok with seeing gexiv2 provide a method that calculates this data from the fields, in the same way that get_gps_info calculates gps data from several different EXIF fields, however my only request is that this is implemented as a new method, and existing methods are left alone. Altering the behavior of existing methods just results in migration headaches for all users of gexiv2, which i'd like to avoid.
Thanks.
Comment 6
Updated by Jim Nelson 3 months ago
We're on the same page, Robert. We would add new methods to return this composite information.
--- Bug imported by chaz@yorba.org 2013-11-16 14:44 UTC ---
This bug was previously known as bug 7316 at http://redmine.yorba.org/show_bug.cgi?id=7316 Imported an attachment (id=259972) Imported an attachment (id=259973)
Unknown version " in product gexiv2. Setting version to "!unspecified". Unknown milestone "unknown in product gexiv2. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one. Resolution set on an open status. Dropping resolution