[Digikam-devel] XMP to solve tags name and Tags Path record in pictures metadata...

Gilles Caulier caulier.gilles at gmail.com
Mon Oct 1 14:38:35 BST 2007


Hi all,

Like it have been reported in this room more than one time in the pass,
especially by Daniel Bauer, we have a problem to store the digiKam tags in
pictures metadata.

*** THE PASS ***

digiKam from KDE3 branch only support IPTC has user friendly photograph
metadata. IPTC/IIM to be more precise, only support officialy non UTF-8
characters encoding and have a lots of restriction about strings size to
embed in metadata.

digiKam from KDE3 branch only store Tags Path list as IPTC keywords (ASCII +
64 char size). The tag name is never saved as well somewhere.
To be clear a Tags Path is the list of path to describe Tags assigned to a
picture. For example :

Places/pyrénées
gilles/adrien
gilles/adrien/testphoto
Dynax 5D
Places/pyrénées/pic du midi
Tests Pictures/holidays

This way is used to restore a picture tags tree on database during import
(like comments, rating, date).

But this way provide a problem when you export a picture to flickr for ex,
when the IPTC keywords are interpreted as well like tag item. The whole path
name will be used as Flickr tag name.

*** THE FUTURE ***

Now, with digiKam for KDE4, we support XMP !

I have solved this issue in my computer to store the all Tags Path in a
dedicaced Xmp namespace named... digiKam.

The Tag name will be store in a standard Xmp tag (not listed in example
below, because it's not yet implemented in my computer (:=))), and the Tags
Path list in a private Xmp tag (see below). There is a screenshot of digiKam
running with this issue :

http://digikam3rdparty.free.fr/Screenshots/digikamKDE4_11.png

The Xmp resume is given below :

File name: photo-000048.jpg (XMP Schema)

>>> xmp <<<
Create Date : 2006:12:29 11:36:26
Creator Tool : digiKam-0.10.0-svn
Metadata Date : 2006:12:29 11:36:26
Modify Date : 2006:12:29 11:36:26
Rating : 3

>>> dc <<<
Description : Photo taken at "Pic du Midi"

>>> digiKam <<<
TagsList : Places/pyrénées, gilles/adrien, gilles/adrien/testphoto, Dynax
5D, Places/pyrénées/pic du midi, Tests Pictures/hollidays

>>> exif <<<
DateTimeOriginal : 2006:12:29 11:36:26
PixelXDimension : 3016
PixelYDimension : 2008
UserComment : Photo taken at "Pic du Midi"

>>> photoshop <<<
DateCreated : 2006:12:29 11:36:26

>>> tiff <<<
ImageLength : 2008
ImageWidth : 3016
Make : KONICA MINOLTA
Model : DYNAX 5D

And the raw Xmp data are :

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:xap="http://ns.adobe.com/xap/1.0/"
    xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:digiKam="http://www.digikam.org/"
   xap:CreatorTool="digiKam-0.10.0-svn"
   xap:ModifyDate="2006:12:29 11:36:26"
   xap:CreateDate="2006:12:29 11:36:26"
   xap:MetadataDate="2006:12:29 11:36:26"
   xap:Rating="3"
   tiff:ImageWidth="3016"
   tiff:ImageLength="2008"
   tiff:Make="KONICA MINOLTA "
   tiff:Model="DYNAX 5D"
   exif:PixelXDimension="3016"
   exif:PixelYDimension="2008"
   exif:DateTimeOriginal="2006:12:29 11:36:26"
   photoshop:DateCreated="2006:12:29 11:36:26">
   <exif:UserComment>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">Photo taken at "Pic du Midi"</rdf:li>
    </rdf:Alt>
   </exif:UserComment>
   <dc:Description>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">Photo taken at "Pic du Midi"</rdf:li>
    </rdf:Alt>
   </dc:Description>
   <digiKam:TagsList>
    <rdf:Seq>
     <rdf:li>Places/pyrÃ(c)nÃ(c)es</rdf:li>
     <rdf:li>gilles/adrien</rdf:li>
     <rdf:li>gilles/adrien/testphoto</rdf:li>
     <rdf:li>Dynax 5D</rdf:li>
     <rdf:li>Places/pyrÃ(c)nÃ(c)es/pic du midi</rdf:li>
     <rdf:li>Tests Pictures/hollidays</rdf:li>
    </rdf:Seq>
   </digiKam:TagsList>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>

As Xmp use UTF-8 endoding nothing is lost ! Also, the strings size are not
limited ! The only limitation (for JPEG only) is the JFIF APP1 section used
to store Xmp packet wich is limited to... 64Kb (PNG chunk and TIFF tag don't
have this limitation.)

Nota : With the new future Database structure, we will store certainly more
private informations in Xmp digiKam namespace... Marcel, we can do what we
want (:=))) Xmp rock...

But i have a question about how to save the a tag path. Currently the
separator is a '/'. This can be a problem if user use this character in a
tag name because it will break the tags tree in a future import
(backup/restore). If somebody has an alternative to prevent this problem,
let's me hear...

Thanks in advance for you constructive remarks...

Gilles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20071001/61bfb1f2/attachment.html>


More information about the Digikam-devel mailing list