ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Abedellatif on November 23, 2017, 08:35:51 AM

Title: Writing duplicate xmp tags to jpeg files
Post by: Abedellatif on November 23, 2017, 08:35:51 AM
What is the proper option to use for writing XMP tags to a jpeg file? in the case if I have more than one value for the creator tag for example I have:
<dc:creator>Il'in, Mijail Aleksandrovich.</dc:creator>
  <dc:creator>Renau, Josep (1907-1982)</dc:creator>
  <dc:creator>Quiroga Plá, José María (1902-1955)</dc:creator>
  <dc:creator>Chávez Morado, José (1909-2002)</dc:creator>
when I write these to the file the last value appear in the image.
the command line is as follows:
exiftool -m -overwrite_original -charset latin "-xmp:creator=Il'in, Mijail Aleksandrovich." "-xmp:creator=Renau, Josep (1907-1982)" "-xmp:creator=Quiroga Plá, José María (1902-1955)" "-xmp:creator=Chávez Morado, José (1909-2002)" "C:\Users\Public\Documents\img.jpg"
Please advise.
Thanks.
Title: Re: Writing duplicate xmp tags to jpeg files
Post by: Phil Harvey on November 23, 2017, 08:40:36 AM
Quote from: Abedellatif on November 23, 2017, 08:35:51 AM
when I write these to the file the last value appear in the image.

Why do you say this?  Using what software?  Use ExifTool to extract the tag and you should see all the values you wrote.  Your exiftool command was correct to write them.

Your XMP sample wasn't formatted properly however.  It should have been:

  <dc:creator>
   <rdf:Seq>
    <rdf:li>Il'in, Mijail Aleksandrovich.</rdf:li>
    <rdf:li>Renau, Josep (1907-1982)</rdf:li>
    <rdf:li>Quiroga Plá, José María (1902-1955)</rdf:li>
    <rdf:li>Chávez Morado, José (1909-2002)</rdf:li>
   </rdf:Seq>
  </dc:creator>


which is how ExifTool will write it.

- Phil
Title: Re: Writing duplicate xmp tags to jpeg files
Post by: Abedellatif on November 23, 2017, 08:48:04 AM
Using XnviewMP to view the written tags. What do you mean with "Your XMP sample wasn't formatted properly however."

Thanks
Title: Re: Writing duplicate xmp tags to jpeg files
Post by: Phil Harvey on November 23, 2017, 08:49:50 AM
I updated my post with a sample of what the XMP should look like.

- Phil
Title: Re: Writing duplicate xmp tags to jpeg files
Post by: Abedellatif on November 23, 2017, 08:50:43 AM
The original information was copied from this DC file
Title: Re: Writing duplicate xmp tags to jpeg files
Post by: Phil Harvey on November 23, 2017, 08:51:29 AM
OK.  That's not XMP.  It's plain XML.

- Phil
Title: Re: Writing duplicate xmp tags to jpeg files
Post by: Abedellatif on November 23, 2017, 09:05:42 AM
It worked fine now. I am sure what was the reason
On another note is there a way to write un-formatted xmp:date tag such as this:1788/1821. because exiftool writes it as:
<dc:date>
<rdf:Seq>
<rdf:li>1788-18-21</rdf:li>
</rdf:Seq>
</dc:date>

Thanks again
Title: Re: Writing duplicate xmp tags to jpeg files
Post by: Phil Harvey on November 23, 2017, 09:14:44 AM
You would need to override ExifTool's XMP-dc:Date definition with a user-defined tag (https://exiftool.org/config.html) to be able to write an incorrectly formatted value to that tag.

- Phil
Title: Re: Writing duplicate xmp tags to jpeg files
Post by: Abedellatif on November 23, 2017, 09:18:23 AM
Thank You very much.