[Digikam-devel] Image history in metadata
ahuggel at gmx.net
Sun Jun 13 10:42:51 CEST 2010
Technically, I think storing an XML structure in an XMP text field is
not a problem, if you don't mind the overhead: First, parse the XMP
with exiv2 (which uses the expat XML parser), then separately parse
the embedded XML text (potentially using another XML parser).
Alternatively, you can look at specifying the image editing history
"language" directly in XMP as you said, either within the digiKam
schema or in a new schema for this purpose. XMP allows for more than
the common basic types; it also supports things like structures,
qualifiers and nested types. See here for some examples in an exiv2
context and to get an idea: http://www.exiv2.org/example5.html and the
XMP specifications for details: http://www.adobe.com/devnet/xmp/. Of
the two options, I would prefer this one.
On Fri, Jun 11, 2010 at 20:01, Marcel Wiesweg <marcel.wiesweg at gmx.de> wrote:
> for the GSoc project about non-destructive image editing we have come up with
> an XML format in which we would like to store the image history.
> Now thinking about storing this in metadata, we have crossed the problem of
> storing XML in XMP's XML. Alternatively, the structure could be inserted
> directly in XMP, but it is not easily mapped to a single list or map, so using
> bag or other XMP structures appears not easy.
> For reference, see some example XML at the bottom of this mail.
> What is the best way to put this into metadata?
> Thanks, Marcel
>> We are indeed using XML formatted directly in digikam. The purpose of this
>> XML creation is not primarly for storing this in the metadata, but rather
>> as a specified format that can describe the changes, slightly inspired by
>> OpenRaster's XML. We can add attributes to all nodes and extend it in the
>> The XML will also be used in other places, and it's a bit more complex than
>> a simple map, which would be too limiting. We will also store the XML in
>> the database.
>> So far I did not think about the implication that XMP is also based on XML,
>> and we now have the purpose of storing XML in XML. Hm.
>> So we either really store it as a string, or we try to integrate it into
>> XMP. Is XMP flexible enough to carry a custom chunk of xml?
> <file type="raw">
> <filter name="digikam:rawimport" version=1 category="reproducible">
> <description>"Manual Raw import"</description>
> <param name="interpolationMethod">Bilinear</param>
> ... // many more params
> <file type="intermediate">
> <filter name="digikam:crop" version=1 category="reproducible">
> <param name="rect" x="10" y="10" width="90" height="40" />
> <file type="current">
More information about the Digikam-devel