Author Topic: Writing duplicate xmp tags to jpeg files  (Read 1193 times)

Abedellatif

  • Newbie
  • *
  • Posts: 8
Writing duplicate xmp tags to jpeg files
« 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.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: Writing duplicate xmp tags to jpeg files
« Reply #1 on: November 23, 2017, 08:40:36 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:

Code: [Select]
  <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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Abedellatif

  • Newbie
  • *
  • Posts: 8
Re: Writing duplicate xmp tags to jpeg files
« Reply #2 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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: Writing duplicate xmp tags to jpeg files
« Reply #3 on: November 23, 2017, 08:49:50 AM »
I updated my post with a sample of what the XMP should look like.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Abedellatif

  • Newbie
  • *
  • Posts: 8
Re: Writing duplicate xmp tags to jpeg files
« Reply #4 on: November 23, 2017, 08:50:43 AM »
The original information was copied from this DC file

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: Writing duplicate xmp tags to jpeg files
« Reply #5 on: November 23, 2017, 08:51:29 AM »
OK.  That's not XMP.  It's plain XML.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Abedellatif

  • Newbie
  • *
  • Posts: 8
Re: Writing duplicate xmp tags to jpeg files
« Reply #6 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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: Writing duplicate xmp tags to jpeg files
« Reply #7 on: November 23, 2017, 09:14:44 AM »
You would need to override ExifTool's XMP-dc:Date definition with a user-defined tag to be able to write an incorrectly formatted value to that tag.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Abedellatif

  • Newbie
  • *
  • Posts: 8
Re: Writing duplicate xmp tags to jpeg files
« Reply #8 on: November 23, 2017, 09:18:23 AM »
Thank You very much.