I need to add new tags to many images, the tags are:
AboveGroundAltitude
BandName
CentralWaveLength
ColorTransform
PerspectiveDistortion
PerspectiveFocalLength
PrincipalPoint
WavelengthFWHM
I created this configuration file:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::xmp' => {
NewXMPxmpTag => { Groups => { 1 => 'AboveGroundAltitude' } },
NewXMPxmpTag => { Groups => { 1 => 'BandName' } },
NewXMPxmpTag => { Groups => { 1 => 'CentralWaveLength' } },
NewXMPxmpTag => { Groups => { 1 => 'ColorTransform' } },
NewXMPxmpTag => { Groups => { 1 => 'PerspectiveDistortion' } },
NewXMPxmpTag => { Groups => { 1 => 'PerspectiveFocalLength' } },
NewXMPxmpTag => { Groups => { 1 => 'PrincipalPoint' } },
NewXMPxmpTag => { Groups => { 1 => 'WavelengthFWHM' } },
},
);
Variations: I've tried group 0 the first time, then read somewhere that XMP tags belong to group 1 and edited accodingly.
And I'm running the command like this:
exiftool -config config.txt -ext jpg \
-AboveGroundAltitude='55.8224668413325'\
-BandName='Red, Garbage, NIR'\
-CentralWaveLength='625, 0, 850'\
-ColorTransform='1.000, 0.000, -0.996, 0.000, 0.000, 0.000, -0.286, 0.000, 4.350'\
-PerspectiveDistortion='-0.093, 0.122, 0.000, 0.000, 0.000'\
-PerspectiveFocalLength='5.4'
-PrincipalPoint='3.100, 2.325'\
-WavelengthFWHM='100, 0, 40' test.jpg
Variations tried:
- -xmp:AboveGroundAltitude='55.8224668413325'
- -XMP-AboveGroundAltitude='55.8224668413325'
- -XMP-xmp:AboveGroundAltitude='55.8224668413325'
- all the three above with `+=` between the tag and the value
Also note the backslashes were added here for clarity, my original command is a one liner with no newlines nor backslashes.
The error I'm getting is (I'm using a mix of options tried here to illustrate different error messages, but when I tried them the style for options were normalized at each try):
Also, used -v4
for more verbose logging
exiftool -config config.txt -v4 -ext jpg -XMP-AboveGroundAltitude='55.8224668413325' -xmp:BandName='Red, Garbage, NIR' -XMP-xmp:CentralWaveLength='625, 0, 850' -xmp:ColorTransform='1.000, 0.000, -0.996, 0.000, 0.000, 0.000, -0.286, 0.000, 4.350' -PerspectiveDistortion='-0.093, 0.122, 0.000, 0.000, 0.000' -xmp:PerspectiveFocalLength='5.4' -xmp:PrincipalPoint='3.100, 2.325' -xmp:WavelengthFWHM='100, 0, 40' test.jpg
Tag 'XMP-AboveGroundAltitude' is not defined or has a bad language code
Warning: Tag 'XMP-AboveGroundAltitude' is not defined or has a bad language code
Tag 'xmp:BandName' is not defined
Warning: Tag 'xmp:BandName' is not defined
Tag 'XMP-xmp:CentralWaveLength' is not defined
Warning: Tag 'XMP-xmp:CentralWaveLength' is not defined
Sorry, xmp:ColorTransform doesn't exist or isn't writable
Warning: Sorry, xmp:ColorTransform doesn't exist or isn't writable
Tag 'PerspectiveDistortion' is not defined
Warning: Tag 'PerspectiveDistortion' is not defined
Tag 'xmp:PerspectiveFocalLength' is not defined
Warning: Tag 'xmp:PerspectiveFocalLength' is not defined
Tag 'xmp:PrincipalPoint' is not defined
Warning: Tag 'xmp:PrincipalPoint' is not defined
Tag 'xmp:WavelengthFWHM' is not defined
Warning: Tag 'xmp:WavelengthFWHM' is not defined
Nothing to do.
Notice how the message for ColorTransform
is different
Note: Already seen enter link description here and other related posts here and in the exiftool forum.