Writing XMP data to sidecar file fails.
Added by Anonymous Poster almost 8 years ago
Hi,
I am struggling with using exiv2 to set xmp data in XMP sidecar files.
Basically, I am trying to set "Xmp.dc.subject" to a new value. Strangely this fails when I am writing to a sidecar file (.xmp), but works, when working directly on a jpg file. However, according to the matrix of "suported image formats" it should be possible to write XMP data in xmp files, so I am wondering what I am doing wrong...
Here's what I am doing:
1) Check the original content of Xmp.dc.subject:
$exiv2 -v -px test.xmp | grep subject
Xmp.dc.subject XmpBag 1 OldTag
2) Set the new value:
$exiv2 -v -M"set Xmp.dc.subject NewTag" test.xmp
File 1/1: test.xmp
Set Xmp.dc.subject "NewTag" (XmpBag)
3) Check the new value
$exiv2 -v -px test.xmp | grep subject
Xmp.dc.subject XmpBag 1 OldTag
-> Still the old value (OldTag), the new value (NewTag) was not written.
If I do the same for a jpg file, everything seems fine:
1) $exiv2 -v -px test.jpg | grep subject
Xmp.dc.subject XmpBag 1 OldTag
2) $exiv2 -v -M"set Xmp.dc.subject NewTag" test.jpg
File 1/1: test.jpg
Set Xmp.dc.subject "NewTag" (XmpBag)
3) $ exiv2 -v -px test.jpg | grep subject
Xmp.dc.subject XmpBag 2 OldTag, NewTag
So I am now a bit confused. Can someone please tell me, if/how I can use exiv2 to write to XMP sidecar files?
Thanks a lot, Daniel