[Digikam-devel] libkexiv2 interface & exif composite tags
Andreas Huggel
ahuggel at gmx.net
Fri May 7 02:31:56 BST 2010
> One thing that would also be wise is something like exiftools composite tags,
> I think. Currently every component is parsing makernotes on their own when no
> standard exif.photo or exif.image tags exists or do it not.
> This is needed as for example older canon dslrs have metering mode and
> exposure program only in makernotes on a own coding, other samples are lensid
> strings or something like subject distance which is in nikon images only in
> makernotes and have to be decoded be a specific function.
> So why not bundle this knownledge to a middle-layer - composite tags. The
> questions is also where to implement that middle layer, libkexiv2 or exiv2?
Exiv2 has "easy-access" functions [1], [2] to help with the selection
of a tag which may be stored in different places. Together with
"pretty-print" functions which convert each individual proprietary tag
value into a standard format, the easy-access functions can be used to
access a particular piece of information in a common format without
having to know about where it is stored (e.g., ISO, lens name). The
current Exiv2 architecture doesn't easily allow for "composite tags"
the way exiftool implements them, i.e., virtual tags (which don't
really exist in the metadata) computed from several existing tag
values. There is a plan for a "Unified Metadata Container" [3], which
will fix this, but that's a rather major change.
In the meantime, "pretty-print" functions are used as a workaround of
sorts for such functionality, since it is possible to access other
Exif tags from the pretty-print function for a specific tag. For
example, the Nikon lens name for some Nikon cameras is available
through the pretty-print function of the Exif.NikonLd3.LensIDNumber
tag. But the value of this tag alone doesn't map to the lens name. The
function needs to look up half a dozen other tags to determine the
lens name (besides those required to decrypt the relevant makernote
portion).
Andreas
[1] http://www.exiv2.org/doc/easyaccess_8hpp.html
[2] http://dev.exiv2.org/repositories/entry/exiv2/trunk/samples/easyaccess-test.cpp
[3] http://dev.exiv2.org/versions/show/31
More information about the Digikam-devel
mailing list