Copying specific section from xmp to source files

Started by warrencalvert, February 02, 2023, 06:48:21 PM

Previous topic - Next topic

warrencalvert

Hi

I see some posts with similar requests but none that exactly fit what I need to do and am struggling to work it out so would be grateful for some help.

I need to copy the entire regions section, as shown below, from xmp files to the corresponding source files.

<mwg-rs:Regions rdf:parseType="Resource">
    <mwg-rs:AppliedToDimensions
    stDim:w="5312"
    stDim:h="2988"
    stDim:unit="pixel"/>
    <mwg-rs:RegionList>
    <rdf:Seq>
      <rdf:li>
      <rdf:Description
        mwg-rs:Type="Face"
        mwg-rs:Name="face name">
      <mwg-rs:Area
        stArea:x="0.466771"
        stArea:y="0.318608"
        stArea:w="0.028125"
        stArea:h="0.050000"
        stArea:unit="normalized"/>
      </rdf:Description>
      </rdf:li>
    </rdf:Seq>
    </mwg-rs:RegionList>
  </mwg-rs:Regions>

The difficulty is I need to process all files with all extensions except RAW files (i.e. NEF and CRW)
I also can't find how to copy just this section.

Thanks,
Warren.


-

StarGeek

To copy then entire MWG region info, you would just copy RegionInfo.  See the MWG tags page.

The command would be almost the same as I posted previously, except you want to not process XMP files by using two hyphens, change the source file extension to XMP, and specify only the RegionInfo tag.

exiftool -r --ext xmp -TagsFromFile %d%f.xmp -RegionInfo /path/to/files/
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype