News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Writing duplicate xmp tags to jpeg files

Started by Abedellatif, November 23, 2017, 08:35:51 AM

Previous topic - Next topic

Abedellatif

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

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

Abedellatif

Using XnviewMP to view the written tags. What do you mean with "Your XMP sample wasn't formatted properly however."

Thanks

Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Abedellatif

The original information was copied from this DC file

Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Abedellatif

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).