Offer composite accessors for commonly-needed information
Submitted by Jim Nelson
---- Reported by firstname.lastname@example.org 2013-08-08 13:30:00 -0700 ----
Original Redmine bug id: 7319
Original URL: http://redmine.yorba.org/issues/7319
Searchable id: yorba-bug-7319
Original author: Jim Nelson
gexiv2's interface is primarily designed as a GObject wrapper around Exiv2. It does that today reasonably well.
The interface also offers conversion functions which can take the metadata and
return it not as a string but as an appropriate data type. For example,
It also offers specialized conversion functions for well-known Exiv2 tags. For example, @gexiv2_metadata_get_fnumber(), which converts the string into a rational then does the math to convert the rational into a double.
The further down the above list you go, the further gexiv2 veers from its intended purpose. There is some value in all of the above.
It's worth considering adding a final set of functions to this list, something called "composite" metadata in ExifTool. Composite accessors take metadata from a number of locations and puts it together to form a single data object representing some aspect of the photo. A good example would be
GDateTime* gexiv2_metadata_get_creation_time(GExiv2Metadata* self);
Which could then assemble the best answer for this question from the available metadata and return a single GDateTime as an answer. In EXIF, that would mean including subsecond precision (#7316). For IPTC, that means taking the created date and created time and putting them together. And so on.
The difference between these composite accessors and the above are that (a) the user doesn't get to pick the Exiv2 tags used for the determination, (b) they may use multiple tags as sources of information, and (c) the function searches through all domains (EXIF, IPTC, XMP) for available information.
It might be worth considering performing this work in Vala, as this layer of abstraction should have no need to touch Exiv2's C++ interface. In essence, these calls use the basic library calls to assemble this information.
Related issues: related to gexiv2 - Feature #7644: Offer previews/thumbnails as GdkPixbuf (Open) related to gexiv2 - Feature #7316: Add milliseconds to get_date_time() in GExiv2.py (Open)
--- Bug imported by email@example.com 2013-11-16 14:44 UTC ---
This bug was previously known as bug 7319 at http://redmine.yorba.org/show_bug.cgi?id=7319
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