Hi!
I am trying to use some custom fields with ExifTool and I have a problem with the writing. I have defined a custom configuration file that I have put in my home folder, it's properly recognized (I have tried with a 'print' at the end of the file). But whenever I tried to define a value for one of the custom field, I have no error but the value is not written.
Here is my configuration file:
%Image::ExifTool::UserDefined::FifthSun = (
GROUPS => { 0 => 'XMP', 1 => 'XMP-FifthSun', 2 => 'Image' },
NAMESPACE => { 'FifthSun' => 'http://ns.myname.com/FifthSun/1.0/' },
WRITABLE => 'string',
ProductLine => { },
);
%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::Main' => {
FifthSun => {
SubDirectory => {
TagTable => 'Image::ExifTool::UserDefined::FifthSun',
},
},
},
);
#------------------------------------------------------------------------------
1; #end
And here is the command lines I have run for testing it:
~$ exiftool -m -G -XMP:ProductLine test.psd
[XMP] Product Line : GMOT - General Motors
~$ exiftool -m -G -XMP:ProductLine=MyNewValue test.psd
1 image files updated
~$ exiftool -m -G -XMP:ProductLine test.psd
[XMP] Product Line : GMOT - General Motors
So I don't have any errors but the update didn't work. Do you have an idea of what I'm doing wrong?
Thank you so much for your help!
I think this is FAQ 3 (https://exiftool.org/faq.html#Q3).
(If ExifTool says the file was updated, then it was.)
- Phil
Thank you very much Phil for your answer, it helped me a lot. Using the options '-a -G1 -s' shows that I have a duplicate value for the tag I'm trying to update.
exiftool -a -G1 -s -XMP:ProductLine test.psd
[XMP-fifth] ProductLine : ACDC
[XMP-tmp0] ProductLine : GMOT - General Motors
I don't understand how to avoid that duplication, do you have any clues?
Thank you again for your help!
I just did a test with a file that does not contain my custom tag and it's properly written. My issue seems to appear for files that already contain my custom tag.
OK, I just found my issue. Actually, the namespace I have defined in my config file was incorrect. So I use the -xmp -b option to get the correct namespace for my custom tags and now it works perfectly!
Thank you again for your help Phil!
Glad you figured it out!
- Phil