ExifTool Forum

General => Metadata => Topic started by: mchab on June 06, 2022, 06:36:24 AM

Title: Add XMP:ImageDescription to existing exif:ImageDescription
Post by: mchab on June 06, 2022, 06:36:24 AM
Hi all,

how can I add an XMP:ImageDescription to an existing exif:ImageDescription? I tried with exiftool

"-exif:ImageDescription+<xmp:ImageDescription" img.jpg

but it says "no writeable tag". But when I simply overwrite the exif tag with

"-exif:ImageDescription<xmp:ImageDescription" img.jpg

all goes fine.

I use Digicam for organization on a Mac (every description is in XMP:Description) - but know I want my relatives to comment on the scanned old photos, adding context to them with Synology Photos, which writes to exif:ImageDescription. So if they are done I want to merge the xmp description (mine) with the exif:description (relatives) so neither mine oder their descriptions get's lost. Does that make sense? :-)

So how can I write the line for exiftool to add the existing xmp:ImageDescription (e.g. "123") to an existing exif:ImageDescription (e.g. "456") so the image contains "123 456" in one tag?

Thank you for any help.
Title: Re: Add XMP:ImageDescription to existing exif:ImageDescription
Post by: StarGeek on June 06, 2022, 12:06:36 PM
The plus sign + is only used to either increment a value or to add a entry to a list type tag.

In order to combine two tags, you would copy the original tag with the new tag appended back into the original tag
exiftool "-exif:ImageDescription<$exif:ImageDescription $xmp:ImageDescription" /path/to/files/

Example:
C:\>exiftool -G1 -a -s -ImageDescription y:\!temp\Test4.jpg
[IFD0]          ImageDescription                : exif:ImageDescription
[XMP-tiff]      ImageDescription                : xmp:ImageDescription

C:\>exiftool -P -overwrite_original "-exif:ImageDescription<$exif:ImageDescription $xmp:ImageDescription" y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -ImageDescription y:\!temp\Test4.jpg
[IFD0]          ImageDescription                : exif:ImageDescription xmp:ImageDescription
[XMP-tiff]      ImageDescription                : xmp:ImageDescription
Title: Re: Add XMP:ImageDescription to existing exif:ImageDescription
Post by: mchab on June 13, 2022, 04:41:43 AM
Thanks a lot! :) Sorry that I got that wrong.
Title: Re: Add XMP:ImageDescription to existing exif:ImageDescription
Post by: mchab on June 13, 2022, 05:20:02 AM
Sorry but it doesn't work.

I did
exiftool -G1 -a -s -ImageDescription /Users/user/Desktop/test.jpg
[IFD0]          ImageDescription                : Hi
[XMP-tiff]      ImageDescription                : Test


and then:
exiftool -P -overwrite_original "-exif:ImageDescription<$exif:ImageDescription $xmp:ImageDescription" /Users/user/Desktop/test.jpg


But exiftool says:

Warning: No writable tags set from /Users/user/Desktop/test.jpg
Warning: Invalid tag name ':imagedescription :imagedescription' - /Users/user/Desktop/test.jpg
    0 image files updated
    1 image files unchanged

Title: Re: Add XMP:ImageDescription to existing exif:ImageDescription
Post by: StarGeek on June 13, 2022, 11:50:40 AM
If your using something other than Windows CMD (Linux/Mac/Windows PowerShell), then change the double quotes into single quotes.

I do not recommend using PowerShell with exiftool.  PowerShell will corrupt binary data when redirecting/piping and has a multitude of other problems.
Title: Re: Add XMP:ImageDescription to existing exif:ImageDescription
Post by: mchab on June 20, 2022, 07:02:36 AM
You are a StarGeek! Thank you - I am on Mac/Terminal, so the " vs ' was the problem. :)