ExifTool Forum

ExifTool => Newbies => Topic started by: amkellett on January 19, 2018, 07:40:02 PM

Title: custom xmp tags not being copied to destination
Post by: amkellett on January 19, 2018, 07:40:02 PM
Hi, I'm trying to wholesale copy metadata from original .jpg files to .jpg files that had metadata stripped during image processing. 
This:   perl "C:\Windows\exiftool.pl" -a -u -g1 "C:\AV GIS\hot spot removal\e168\Images\glom\IMG_000149_RGB.jpg" > catstar.txt
yields this in the redirected output (many tags omitted for brevity, including ALL the EXIF data): 
...
---- XMP-avi ----
Auto Color                      : 0
Auto Exposure                   : 1
Avx Time                        : 192664
Blue Pixel Intensity Count      : 11533612
Blue Threshold A Count          : 433
...
Ils nir                         : 6359.000000
Ils red                         : 4391.000000
---- XMP-xmp ----
Rating                          : 0

But the result of this:
perl "C:\Windows\exiftool.pl" -tagsfromfile "C:\AV GIS\hot spot removal\e168\Images\glom\test\IMG_000149_RGB.tif" -all:all "C:\AV GIS\hot spot removal\e168\Images\glom\corrected\IMG_000149_RGB.jpg"

Only produces these xmp tags in the destination .jpg:

XMP_<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 10.61'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>

<rdf:Description rdf:about=''
  xmlns:crs='http://ns.adobe.com/camera-raw-settings/1.0/'>
  <crs:AutoExposure>True</crs:AutoExposure>
</rdf:Description>

<rdf:Description rdf:about=''
  xmlns:exif='http://ns.adobe.com/exif/1.0/'>
  <exif:ComponentsConfiguration>
   <rdf:Seq>
    <rdf:li>1</rdf:li>
    <rdf:li>2</rdf:li>
    <rdf:li>3</rdf:li>
    <rdf:li>0</rdf:li>
   </rdf:Seq>
  </exif:ComponentsConfiguration>
</rdf:Description>

<rdf:Description rdf:about=''
  xmlns:tiff='http://ns.adobe.com/tiff/1.0/'>
  <tiff:BitsPerSample>
   <rdf:Seq>
    <rdf:li>8</rdf:li>
   </rdf:Seq>
  </tiff:BitsPerSample>
  <tiff:ImageLength>3648</tiff:ImageLength>
  <tiff:ImageWidth>4864</tiff:ImageWidth>
  <tiff:YCbCrPositioning>1</tiff:YCbCrPositioning>
  <tiff:YCbCrSubSampling>
   <rdf:Seq>
    <rdf:li>2</rdf:li>
    <rdf:li>2</rdf:li>
   </rdf:Seq>
  </tiff:YCbCrSubSampling>
</rdf:Description>

<rdf:Description rdf:about=''
  xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
  <xmp:Rating>0</xmp:Rating>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>


This is on Win7.  EXIF data is not a problem. I really want to get all the XMP tags and data under that XMP-avi group visible in the redirected read output.
This is probably the newbiest of newbie questions.
Thanks.
                               
Title: Re: custom xmp tags not being copied to destination
Post by: Phil Harvey on January 19, 2018, 10:44:13 PM
If you copy XMP tags individually, then only the writable tags will be written (see the XMP tags docmentation (https://exiftool.org/TagNames/XMP.html) -- XMP-avi is not yet supported).  Try copying as a block instead:

perl "C:\Windows\exiftool.pl" -tagsfromfile "C:\AV GIS\hot spot removal\e168\Images\glom\test\IMG_000149_RGB.tif" -all:all -xmp "C:\AV GIS\hot spot removal\e168\Images\glom\corrected\IMG_000149_RGB.jpg"

This should do what you want for JPEG files as long as the XMP is less than the JPG segment size limit (64kB).

Alternatively you could create user-defined tags to write what you want.

- Phil