Hi guys!
I am wondering to replace a tag existing with a new value. However, a new tag with the same name is create. E.g., exiftool -Irradiance IMG_0200_3.tif
Irradiance : 125.34349122195776
After, trying to replace:
exiftool -Irradiance=130 IMG_0200_3.tif
Irradiance : 130
Irradiance : 125.34349122195776
What I need to do for replacing the tag?
P.S. I already create a .ExifTool_config file for writing this tag
I Appreciate any help!
What is the output of this command on the file with 2 Irradiance values?:
exiftool -G5:1 -irradiance FILE
- Phil
Hi Phil!
Following the output
[TIFF-IFD0-XMP:XMP-Camera] Irradiance : 153.28663351646742
[TIFF-IFD0-XMP:XMP-tmp0] Irradiance : 165.92510639522249
It seems that you are writing Irradiance to a different namespace. I would have to see the original XMP and your config file to be able to tell you exactly what is wrong.
- Phil
Hi Phil.
The original XMP:
.
.
.
| | [adding XMP-Camera:Irradiance
| | Irradiance = 187.72570554138338
| | [adding XMP-Camera:IrradianceYaw]
| | IrradianceYaw = -115.61921789781226
| | [adding XMP-Camera:IrradiancePitch]
| | IrradiancePitch = -12.273107091093493
| | [adding XMP-Camera:IrradianceRoll]
| | IrradianceRoll = -4.1496020301766805
| | [adding XMP-MicaSense:BootTimestamp]
| | BootTimestamp = 248
.
.
.
Follows my config file with the edited parts, i.e. xxx replaced by Camera
.
.
.
# new XMP namespaces (eg. xxx) must be added to the Main XMP table:
'Image::ExifTool::XMP::Main' => {
# namespace definition for examples 8 to 11
Camera => { # <-- must be the same as the NAMESPACE prefix
#Writable => 'rational',
SubDirectory => {
TagTable => 'Image::ExifTool::UserDefined::Camera',
# (see the definition of this table below)
},
},
# add more user-defined XMP namespaces here...
},
.
.
.
# This is a basic example of the definition for a new XMP namespace.
# This table is referenced through a SubDirectory tag definition
# in the %Image::ExifTool::UserDefined definition above.
# The namespace prefix for these tags is 'xxx', which corresponds to
# an ExifTool family 1 group name of 'XMP-xxx'.
%Image::ExifTool::UserDefined::Camera = (
GROUPS => { 0 => 'XMP', 1 => 'XMP-Camera', 2 => 'Camera' },
NAMESPACE => { 'Camera' => 'http://ns.myname.com/xxx/1.0/' },
WRITABLE => 'string', # (default to string-type tags)
# Example 8. XMP-xxx:NewXMPxxxTag1 (an alternate-language tag)
# - replace "NewXMPxxxTag1" with your own tag name (eg. "MyTag")
Irradiance => { Writable => 'string' },
.
.
.
When I use my config file and set a value , e.g., exiftool -Irradiance=65 FILE. XMP-Camera became XMP:tmp0 and a new Irradiance tag is created.
Wagner
Hi Wagner,
You haven't set the correct namespace URI in your config file. You need to change "http://ns.myname.com/xxx/1.0/" to whatever is used in the original XMP. To see the original XMP, do this:
exiftool -xmp -b FILE
- Phil
Hi Phil,
Yeah! Now it works perfectly 8)
Thanks a lot!