Subject: | xmp rdf refid nodes |
Date: | Thu, 24 Aug 2006 21:16:59 +0000 |
To: | bug-Image-ExifTool [...] rt.cpan.org |
From: | Karl Palsson <tweak [...] tweak.net.au> |
Hi,
I'm having some problems with exiftool v6.29 (perl 5.8.7) and xmp blocks within
jpgs.
This has arisen out of interop problems between f-spot (0.1.11 and cvs head) and
exiftool. Both write keywords to the dublin core subject fields. (Exiftool
steps to accomplish this, and resulting xpacket block attached below [1])
f-spot writes almost the same data, but uses refids rather than inline docs (not
sure about the correct terminolgy here, but it looks like it should be
identical, and the f-spot guys say that it's also legal)
Here's an example of an image tagged by f-spot,
$ exiftool -b -xmp 2006_07_16-23_38_50--crw_3136_JFR.jpg
<?xpacket begin="" id="testing"?><x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF
xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xmpBJ="http://ns.adobe.com/xap/1.0/bj/"
xmlns:xmpidq="http://ns.adobe.com/xmp/Identifier/qual/1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/"
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:exif="http://ns.adobe.com/exif/1.0/"
xmlns:aux="http://ns.adobe.com/exif/1.0/aux/">
<rdf:Description rdf:nodeID="anon0">
<aux:Lens>18.0 - 55.0mm</aux:Lens>
<aux:SerialNumber>0360028878</aux:SerialNumber>
</rdf:Description>
<rdf:Description rdf:nodeID="anon1">
<tiff:ImageLength>2048</tiff:ImageLength>
<tiff:ImageWidth>3072</tiff:ImageWidth>
</rdf:Description>
<rdf:Bag rdf:nodeID="anon2">
<rdf:li>faces</rdf:li>
<rdf:li>testingtag</rdf:li>
<rdf:li>anothertest</rdf:li>
</rdf:Bag>
<rdf:Description rdf:about="">
<dc:subject rdf:nodeID="anon2" />
</rdf:Description>
</rdf:RDF>
</x:xmpmeta><?xpacket end="r"?>
(this has been reindented for readability, but nothing more)
Note that the dc:subject block simply refers to the "anon2" bag node.
exiftool can happily dump the xmp block, but it fails to follow the refid on the
dc:subject tag....
$ exiftool -subject 2006_07_16-23_38_50--crw_3136_JFR.jpg
Subject :
I'd like to see either exiftool read this format (I liken it to rpc/encoded vs
doc/literal) or have some lines in the spec pointed out that say this is invalid
rdf.
Cheers,
Karl Palsson
[1] Starting from a clean file and adding keywords with exiftool, along with
sample output
$ exiftool -xmp= exiftool-subject.jpg
$ exiftool -xmp:subject=testkeyword exiftool-subject.jpg
1 image files updated
$ exiftool -xmp:subject+=kword2 exiftool-subject.jpg
1 image files updated
$ exiftool -subject exiftool-subject.jpg
Subject : testkeyword, kword2
$ exiftool -xmp -b exiftool-subject.jpg <?xpacket begin=''
id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 6.29'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description about=''
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<dc:subject>
<rdf:Bag>
<rdf:li>testkeyword</rdf:li>
<rdf:li>kword2</rdf:li>
</rdf:Bag>
</dc:subject>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
[lots of blank space snipped]
<?xpacket end='w'?>k