Project

General

Profile

Bug #622

Exiv2 doesn't parse MicrosoftPhoto schema prefix correctly.

Added by Andreas Huggel over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
xmp
Target version:
Start date:
18 Mar 2009
Due date:
% Done:

100%

Estimated time:

Description

Exiv2 does not correctly parse the MicrosoftPhoto schema prefix from an XMP packet created with with Nikon Capture NX2, which uses "Public XMP Toolkit Core 3.5".
Exiv2 changes MicrosoftPhoto to MicrosoftPhoto_1_ and even MicrosoftPhoto_1__1_.

However, if the XMP packet is created from scratch with Exiv2, all is fine.

(Reported by Gilles Caulier / Sylvain CROUZILLAT)

ahuggel@kelana> ./exiv2 -px 2stars.jpg 
Xmp.xmp.Rating                               XmpText     1  2
Xmp.MicrosoftPhoto_1_.Rating                 XmpText     2  25
Xmp.dc.description                           LangAlt     1  lang="x-default" (c) Sylvain.CROUZILLAT@CROUCROU.COM 
Xmp.dc.subject                               XmpBag      1  Mariage
Xmp.photoshop.DateCreated                    XmpText    10  2008-12-12

ahuggel@kelana> ./exiv2 -ex 2stars.jpg 

ahuggel@kelana> cat 2stars.exv # output slightly edited
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1-Exiv2">
 <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:MicrosoftPhoto_1__1_="http://ns.microsoft.com/photo/1.0/" 
    xmlns:dc="http://purl.org/dc/elements/1.1/" 
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" 
   xap:Rating="2" 
   MicrosoftPhoto_1__1_:Rating="25" 
   photoshop:DateCreated="2008-12-12">
   <dc:description>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">(c) Sylvain.CROUZILLAT@CROUCROU.COM </rdf:li>
    </rdf:Alt>
   </dc:description>
   <dc:subject>
    <rdf:Bag>
     <rdf:li>Mariage</rdf:li>
    </rdf:Bag>
   </dc:subject>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>

ahuggel@kelana> xmpdump 2starts.jpg

ahuggel@kelana> cat 2starts.jpg.xml
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Public XMP Toolkit Core 3.5">
   <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/">
         <xap:Rating>2</xap:Rating>
      </rdf:Description>
      <rdf:Description rdf:about="" 
            xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0">
         <MicrosoftPhoto:Rating>25</MicrosoftPhoto:Rating>
      </rdf:Description>
      <rdf:Description rdf:about="" 
            xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:description>
            <rdf:Alt>
               <rdf:li xml:lang="x-default">(c) Sylvain.CROUZILLAT@CROUCROU.COM </rdf:li>
            </rdf:Alt>
         </dc:description>
         <dc:subject>
            <rdf:Bag>
               <rdf:li>Mariage</rdf:li>
            </rdf:Bag>
         </dc:subject>
      </rdf:Description>
      <rdf:Description rdf:about="" 
            xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
         <photoshop:DateCreated>2008-12-12</photoshop:DateCreated>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>

If the XMP packet is created with Exiv2, all is fine:

ahuggel@kelana> cat e.cmd
set Xmp.xmp.Rating 2
set Xmp.MicrosoftPhoto.Rating 25
set Xmp.dc.description lang="x-default" (c) Sylvain.CROUZILLAT@CROUCROU.COM 
set Xmp.dc.subject Mariage
set Xmp.photoshop.DateCreated 2008-12-12

ahuggel@kelana> ./exiv2 -v -m e.cmd e.jpg 
File 1/1: e.jpg
Set Xmp.xmp.Rating "2" (XmpText)
Set Xmp.MicrosoftPhoto.Rating "25" (XmpText)
Set Xmp.dc.description "lang="x-default" (c) Sylvain.CROUZILLAT@CROUCROU.COM" (LangAlt)
Set Xmp.dc.subject "Mariage" (XmpBag)
Set Xmp.photoshop.DateCreated "2008-12-12" (XmpText)

ahuggel@kelana> ./exiv2 -px e.jpg
Xmp.xmp.Rating                               XmpText     1  2
Xmp.MicrosoftPhoto.Rating                    XmpText     2  25
Xmp.photoshop.DateCreated                    XmpText    10  2008-12-12
Xmp.dc.description                           LangAlt     1  lang="x-default" (c) Sylvain.CROUZILLAT@CROUCROU.COM
Xmp.dc.subject                               XmpBag      1  Mariage

ahuggel@kelana> xmpdump e.jpg

ahuggel@kelana> cat e.jpg.xml 
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1-Exiv2">
 <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:MicrosoftPhoto="http://ns.microsoft.com/Photo/1.0/" 
    xmlns:dc="http://purl.org/dc/elements/1.1/" 
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" 
   xap:Rating="2" 
   MicrosoftPhoto:Rating="25" 
   photoshop:DateCreated="2008-12-12">
   <dc:description>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">(c) Sylvain.CROUZILLAT@CROUCROU.COM</rdf:li>
    </rdf:Alt>
   </dc:description>
   <dc:subject>
    <rdf:Bag>
     <rdf:li>Mariage</rdf:li>
    </rdf:Bag>
   </dc:subject>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta><?xpacket end="w"?>

Associated revisions

Revision 1769 (diff)
Added by Andreas Huggel over 12 years ago

#622: Fixed MicrosoftPhoto URI in call to RegisterNamespace.

Revision 1770 (diff)
Added by Andreas Huggel over 12 years ago

#622: Fixed the same typo in the doc too.

History

#1

Updated by Andreas Huggel over 12 years ago

This seems to be an incompatibility between "Public XMP Toolkit Core 3.5" used by Nikon Capture NX2 and the XMPSDK used by Exiv2. It looks like something is going wrong deep inside XMPSDK.

Next steps:
  • Check if the problem can be reproduced with XMPSDK alone
  • If so, check if the latest version of XMPSDK fixes the problem, if it doesn't, report as a bug for XMPSDK (Adobe)
#2

Updated by Andreas Huggel over 12 years ago

Gilles,

The problem is very simple. Look at the namespace URIs: Nikon Capture NX2 uses http://ns.microsoft.com/photo/1.0 (*p*hoto), but Exiv2 has http://ns.microsoft.com/Photo/1.0/ (*P*hoto). If I make it lowercase in Exiv2, it works with the samples. But which URI is correct??

Andreas

#3

Updated by Gilles Caulier over 12 years ago

Andreas Huggel wrote:

Gilles,

The problem is very simple. Look at the namespace URIs: Nikon Capture NX2 uses http://ns.microsoft.com/photo/1.0 (*p*hoto), but Exiv2 has http://ns.microsoft.com/Photo/1.0/ (*P*hoto). If I make it lowercase in Exiv2, it works with the samples. But which URI is correct??

Andreas

Andreas,

In last Exiftool, Microsoft XMP namespaces are :

MicrosoftPhoto => 'http://ns.microsoft.com/photo/1.0',
MP => 'http://ns.microsoft.com/photo/1.2/',
MPRI => 'http://ns.microsoft.com/photo/1.2/t/RegionInfo#',
MPReg => 'http://ns.microsoft.com/photo/1.2/t/Region#',

For NX i cannot any reference...

Gilles Caulier

#4

Updated by Andreas Huggel over 12 years ago

  • Status changed from New to Resolved
  • Target version set to 0.18.1
  • % Done changed from 0 to 100
#5

Updated by Andreas Huggel over 12 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF