Writing XMP: contradictory mwg-rs vs. MP region information

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Writing XMP: contradictory mwg-rs vs. MP region information

Jens Benecke-2
Hello,

I am writing a script to convert iPhoto 9.4+ metadata (in SQLite3
format) to XMP files which can then be imported by Digikam and hopefully
other applications. So far the script can successfully export titles,
descriptions, ratings, hidden and starred attributes, date info,
keywords/tags, GPS coordinates with named locations and named faces.

I just looked at a face rectangle information that was exported by
Digikam and it seems Digikam puts two different value sets in the XMP
sidecar export, but the positions differ (width and height are
identical) Example below.

Why do the values for "x" and "y" differ for "mwg-rs" and "MP" tag
structures? Is this a bug in Digikam or a difference in specification?
  (Why) do I need to write both?

Thank you!

Jens


    <mwg-rs:Regions rdf:parseType="Resource">
     <mwg-rs:RegionList>
      <rdf:Bag>
       <rdf:li>
        <rdf:Description
         mwg-rs:Name="xxx"
         mwg-rs:Type="Face">
        <mwg-rs:Area
         stArea:x="0.279948"
         stArea:y="0.481771"
         stArea:w="0.0824653"
         stArea:h="0.109954"
         stArea:unit="normalized"/>
        </rdf:Description>
       </rdf:li>
       <rdf:li>
        <rdf:Description
         mwg-rs:Name="yyy"
         mwg-rs:Type="Face">
        <mwg-rs:Area
         stArea:x="0.724392"
         stArea:y="0.447338"
         stArea:w="0.113715"
         stArea:h="0.15162"
         stArea:unit="normalized"/>
        </rdf:Description>
       </rdf:li>
      </rdf:Bag>
     </mwg-rs:RegionList>
    </mwg-rs:Regions>

    <MP:RegionInfo rdf:parseType="Resource">
     <MPRI:Regions>
      <rdf:Bag>
       <rdf:li
        MPReg:Rectangle="0.238715, 0.426794, 0.0824653, 0.109954"
        MPReg:PersonDisplayName="yyy"/>
       <rdf:li
        MPReg:Rectangle="0.667535, 0.371528, 0.113715, 0.15162"
        MPReg:PersonDisplayName="xxx"/>
      </rdf:Bag>
     </MPRI:Regions>
    </MP:RegionInfo>

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users