Skip Menu |

This queue is for tickets about the Image-ExifTool CPAN distribution.

Report information
The Basics
Id: 21173
Status: resolved
Worked: 50 hours (3000 min)
Priority: 0/
Queue: Image-ExifTool

People
Owner: Nobody in particular
Requestors: tweak [...] tweak.net.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.60
Fixed in: 6.36



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
From: EXIFTOOL [...] cpan.org
Hi Karl, Thanks for this bug report, and thanks for the XMP sample. Yes, this is legal. It uses a feature of RDF called a "blank node identifier" that I have not yet seen used in XMP information, and is not yet supported by ExifTool. However, since you have found an application that uses this feature, I will add support for this. Implementing it may take a bit of time, but look for the update to appear in version 6.32, hopefully within a week or so.
Subject: Re: [rt.cpan.org #21173] xmp rdf refid nodes
Date: Sat, 26 Aug 2006 10:09:57 +0000
To: bug-Image-ExifTool [...] rt.cpan.org
From: Karl Palsson <tweak [...] tweak.net.au>
Excellent! Great news! Just as an FYI, the application that is doing this is really SemWeb, a .net rdf library. http://razor.occams.info/code/semweb/ Cheers, Karl P via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=21173 > > > Hi Karl, > > Thanks for this bug report, and thanks for the XMP sample. > > Yes, this is legal. It uses a feature of RDF called a "blank node identifier" that I have not yet > seen used in XMP information, and is not yet supported by ExifTool. However, since you > have found an application that uses this feature, I will add support for this. Implementing it > may take a bit of time, but look for the update to appear in version 6.32, hopefully within a > week or so. > > >
From: EXIFTOOL [...] cpan.org
I've been reading the XMP and RDF/XML specifications more closely. I'm not sure the example you sent is valid XMP, but I still would like ExifTool to be able to read it. Here are a few observations: 1) XMP specification (June 2005), page 23: "The rdf:about attribute on the rdf:Description element is a required attribute that identifies the resource whose metadata this XMP describes". --> If true, this implies that blank nodes can not be used, but I am not sure of this (no specific mention of blank nodes is made in the XMP specification). Also, the Description elements containing the lens information and image size are blank nodes (ie. they have a "nodeID" and are "about" nothing). But since there is no other element which refers to either "anon0" or "anon1", it looks to me like these elements are useless. What does f-spot do with this information? 2) Section 3.1 of the RFD Primer [http://www.w3.org/TR/2004/REC-rdf-primer-20040210/]: "Each node is listed in turn as the subject of an un-nested rdf:Description element, using an rdf:about attribute if the node has a URIref, or an rdf:nodeID attribute if the node is blank." also Page 29 of XMP Specification (June 2005): "Top-level elements must be rdf:Description elements." --> In the example, the blank node "anon2" has no rdf:Description element, but I think it should. Do you have any other applications which can read this sample XMP file? I don't have a recent version of Photoshop, but version 7 barfs on this XMP (to be expected though, it is very restrictive in what it accepts). Unfortunately I don't have any other applications to test this with. Perhaps you could ask the f-spot people to comment on these observations. Thanks.
From: EXIFTOOL [...] cpan.org
OK, I've just released ExifTool 5.32 which should properly handle elements which use the nodeID attribute. I decided to extract information even if it refers to nothing, and assume it refers to the current document when the XMP is rewritten. This turned out to be a rather substantial change. Let me know how it works for you.
Oops. That should be version 6.32, available now from my web page http:// owl.phy.queensu.ca/~phil/exiftool/