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

Gilles Caulier caulier.gilles at gmail.com
Tue Oct 2 10:40:35 BST 2007


2007/10/1, Mikolaj Machowski <mikmach at wp.pl>:
>
> Dnia poniedziałek 01 październik 2007, Gilles Caulier napisał:
> > 2007/10/1, Mikolaj Machowski <mikmach at wp.pl>:
> > > Dnia poniedziałek 01 październik 2007, Gilles Caulier napisał:
> > > >     xmlns:dc="http://purl.org/dc/elements/1.1/"
> > > >     xmlns:digiKam="http://www.digikam.org/ "
> > >
> > > Shouldn't path be more precise?
> > Excepted for digikam.org, where we can host a dedicaced page where users
> > can found the descrition of the provate schema, all others are official
> > and provided by specifications from adobe. For all request please mail
> > to Adobe support (:=)))
>
> Well, I was commenting on digikam.org,  the  rest was left as comparison
> (all the 1.0, 1.1 ;)


ok

Just for the fun, look like Micro$oft use XMP metadata with jpeg files under
M$ Vista to index pictures. M$ use a dedicaced XMP schema to record private
tags.
This schema provide an URL to the spec. like the Adode XMP paper ask in this
case, but the url is... invalid (:=)))). Try with this picture :

http://digikam3rdparty.free.fr/TEST_IMAGES/METADATA/Vista/Autumn Leaves.jpg

[gilles at localhost Vista]$ exiv2 -px Autumn\ Leaves.jpg
Xmp.dc.creator                               XmpSeq      1  Peter Miller
Xmp.dc.title                                 LangAlt     1  lang="x-default"
Feuilles d'érable en automne.
Xmp.dc.subject                               XmpBag      3  Exemple,
Paysage, Ceci est un test pour digiKam
Xmp.tiff.artist                              XmpText    12  Peter Miller
Xmp.tiff.copyright                           LangAlt     1  lang="x-default"
(c) Peter Miller/Iconica/Getty Images
Xmp.MicrosoftPhoto.Rating                     XmpText     2  50
Xmp.MicrosoftPhoto.LastKeywordXMP            XmpBag      3  Exemple,
Paysage, Ceci est un test pour digiKam
Xmp.MicrosoftPhoto.LensManufacturer          XmpText    41  ceci est le
champ Fabricant de l'Objectif
Xmp.MicrosoftPhoto.FlashManufacturer         XmpText    37  ceci est le
champs Fabricant du flash
Xmp.MicrosoftPhoto.LensModel                 XmpText    40  ceci est le
champs Modéle de l'Objectif
Xmp.MicrosoftPhoto.FlashModel                 XmpText    35  Ceci est le
champs Modéle du flash
Xmp.MicrosoftPhoto.CameraSerialNumber        XmpText    32  Ceci est le No
de serie de l'APN
Xmp.xmp.Rating                               XmpText     1  3
Xmp.exif.DateTimeOriginal                    XmpText    20
2005-11-05T01:12:05Z
Xmp.xmpMM.InstanceID                         XmpText    41
uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b

To get the Xmp packet, just use Exiv2 command line tool :

exiv2 -eX Autumn\ Leaves.jpg

a new Autumn\ Leaves.xmp file will be created with this content :

<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<xmp:xmpmeta xmlns:xmp="adobe:ns:meta/"><rdf:RDF xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description
rdf:about="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmlns:dc="
http://purl.org/dc/elements/1.1/"><dc:creator><rdf:Seq xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li>Peter
Miller</rdf:li></rdf:Seq>
                        </dc:creator></rdf:Description><rdf:Description
rdf:about="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmlns:tiff="
http://ns.adobe.com/tiff/1.0/"><tiff:artist>Peter
Miller</tiff:artist><tiff:copyright><rdf:Alt xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li
xml:lang="x-default">(c) Peter Miller/Iconica/Getty
Images</rdf:li></rdf:Alt>
                        </tiff:copyright></rdf:Description><rdf:Description
rdf:about="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmlns:MicrosoftPhoto="
http://ns.microsoft.com/photo/1.0"><MicrosoftPhoto:Rating>50</MicrosoftPhoto:Rating></rdf:Description><rdf:Description
rdf:about="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmlns:xmp="
http://ns.adobe.com/xap/1.0/"><xmp:Rating>3</xmp:Rating></rdf:Description><rdf:Description
rdf:about="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmlns:exif="
http://ns.adobe.com/exif/1.0/"><exif:DateTimeOriginal>2005-11-05T01:12:05Z</exif:DateTimeOriginal></rdf:Description><rdf:Description
xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:title><rdf:Alt xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li
xml:lang="x-default">Feuilles d'érable en automne.</rdf:li></rdf:Alt>
                        </dc:title><dc:subject><rdf:Bag xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li>Exemple</rdf:li><rdf:li>Paysage</rdf:li><rdf:li>Ceci
est un test pour digiKam</rdf:li></rdf:Bag>
                        </dc:subject></rdf:Description><rdf:Description
xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0"><MicrosoftPhoto:LastKeywordXMP><rdf:Bag
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li>Exemple</rdf:li><rdf:li>Paysage</rdf:li><rdf:li>Ceci
est un test pour digiKam</rdf:li></rdf:Bag>

</MicrosoftPhoto:LastKeywordXMP></rdf:Description><rdf:Description
xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0"><MicrosoftPhoto:LensManufacturer>ceci
est le champ Fabricant de
l'Objectif</MicrosoftPhoto:LensManufacturer><MicrosoftPhoto:FlashManufacturer>ceci
est le champs Fabricant du
flash</MicrosoftPhoto:FlashManufacturer><MicrosoftPhoto:LensModel>ceci est
le champs Modéle de
l'Objectif</MicrosoftPhoto:LensModel><MicrosoftPhoto:FlashModel>Ceci est le
champs Modéle du
flash</MicrosoftPhoto:FlashModel><MicrosoftPhoto:CameraSerialNumber>Ceci est
le No de serie de
l'APN</MicrosoftPhoto:CameraSerialNumber></rdf:Description></rdf:RDF></xmp:xmpmeta>
<?xpacket end='w'?>

The url to the namespace (ns) definition from M$ is

http://ns.microsoft.com/photo/1.0

Thanks to M$ to provide dumy url (:=)))

> > > 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...
> > >
> > > Maybe some "phishing"?
> > >
> > > Unicode provides several types of slash, among them:
> > >
> > > 2044    ???     FRACTION SLASH
> > > 2215    ???     DIVISION SLASH
> >
> > This can be fine.
>
> Hmm. See below.
> >
> > Comparing to well known solidus:
> > > 002F    /       SOLIDUS
> > >
> > > Since XMP fully supports utf-8 we could use them. But there is one big
> > > problem (as seen above): we may be not sure if user has font with
> > > proper glyphs. Of course it is possible to do some display time
> > > substitute but with that it would be probably better to use some
> > > special sequence of chars, beginning eg with :: and ending with {%this
>
> > > is digikam tags path separator%} :)
> >
> > no; the separator is never displayed somewhere in digiKam it used
> > internally to "separate" all branches of the Tags Album treeview. In
> > fact the right separator char must be used to not be confused with the
> > real text (Tag names)
>
> In that case it is probably better use really different path separator
> (as arrow below) or just plain ASCII where :: seems favorite :)
>
> > > Well, after a moment of thinking... why stop at phishing-like
> > > solutions? Just use real arrows:
> > >
> > > 279D    ???     TRIANGLE-HEADED RIGHTWARDS ARROW
> > >
> > > I put it in some random string in libksirtet.po and works quite nice
> > > on my system.  While I am working on KDE from SVN (3.5 branch), and Qt
> > > 3.4.3 the rest of my system is 2 years old - including fonts.
> > >
> > > If you prefer good old ASCII:
> > > :: - geek friendly, may be not so understandable for "masses"
> >
> > I love this one. It's like C++ namespace. I think it's not used with
> > natural languages. Someone can confirm ?
>
> >> Feature wish: auto synchronisation of appropriate  digiKam tags with
> >> more common XMP schemas like DC, or IPTC Core.
> >
> > Already don in svn (:=))) Just missing 2 methods to sync Exif/Iptc with
> > Xmp, because Xmp can host all standard Exif/Iptc tags.
> >
> > The only tags witch cann ot be sync is makernote. A possible solution is
> > to host markernotes byte array as binary string in a dedicaced Xmp tag.
> > but it doesn't exist in norm.
>
> Binary XML is evil ;) As you wrote in several occasions (in
> apprehension) - leave Makernotes as they are and don't touch them
> if not really necessary.
>
> Personally I am interested *exclusively* in contextual metadata like
> covered in Dublin Core and IPTC Core.


sure but including binary data in a xml packet is supported by the Adobe
paper. Look for example the thumbnail Xmp tag:

http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/XMP.html#xmp

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


More information about the Digikam-devel mailing list