I've been wrestling with this all morning, and thanks to a lot of the forum posts I'm getting super close. I've got some existing images from a studio that I need to update and they've used a custom xmp name space to store data. So, I created a custom config file:
%Image::ExifTool::UserDefined::model = (
GROUPS => { 0 => 'XMP', 1 => 'XMP-model', 2 => 'Image' },
NAMESPACE => { 'model' => 'http://my.custom.namespace/' },
WRITABLE => 'string',
bottomSize => { },
dressSize => { },
height => { },
itemSize => { },
modelName => { },
topSize => { },
);
%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::Main' => {
model => {
SubDirectory => {
TagTable => 'Image::ExifTool::UserDefined::model',
},
},
},
);
Then I used the following command up try and update the modelName, height, and itemSize:
exiftool -config ~/Desktop/exiftool.config -xmp-model:height="4'1\"" -xmp-model:modelName="Bubba Gumption" -xmp-model:itemSize="M" -o ~/Desktop/temp/ [PATH TO FILE]
It looks so close, but in Photoshop (Raw Data) I see:
<custom:height>4'1"</custom:height>
<custom:itemSize>M</custom:itemSize>
<custom:modelName>Bubba Gumption</custom:modelName>
...
<model:bottomSize/>
<model:dressSize/>
<model:height>6'2"</model:height>
<model:itemSize>M</model:itemSize>
<model:modelName>Betty White</model:modelName>
<model:topSize/>
The <custom:... tags I don't want... I just want to update the existing <model:... tags.
I'm sure the error is in my config file, but I don't comprehend it well enough to update those existing fields instead of creating new one.
Thanks for the awesome software and if you're able to help I'd really appreciate that as well :)
-Troy
This is not my strongest area and unfortunately, Phil is away for a while, but I suspect that the problem is the NAMESPACE. Take a look at the raw XMP with
exiftool -XMP -b file.jpg
Look near the beginning of that for the correct NAMESPACE for the model tags.
Beyond that, I would probably have to see the full XMP.
Hey StarGeek! Thanks for the reply!
I ran -XMP -b on the file and it showed me that my line:
NAMESPACE => { 'model' => 'http://my.custom.namespace/' },
Didn't match the line that was in the original file. I copied the line from the original file and it looks like it worked!! Thank you very much for your help!!!
Cheers,
Troy