hello,
I have a folder with some file.tif, these files are orthophotos and contain a lot of specific tags useful to project the image in specific software, in the other folder I have file.png with the same name but different extension, the png image are the result of machine learning algorithms, I need to transfer all the tags from tif to png.
I have used this line:
exiftool -tagsfromfile directory\%f.TIF -ext PNG -all:all -xmp directory2
The transfer happen but it is not complete.
The main tag lost is:
GDAL Metadata : <GDALMetadata>. <Item name="LL_LAT">-0.00497598271485068418</Item>. <Item name="LL_LON">10.51024821201293413253</Item>. <Item name="LR_LAT">-0.00497599193986235974</Item>. <Item name="LR_LON">10.51159206089769249104</Item>. <Item name="UL_LAT">-0.00362307822473520230</Item>. <Item name="UL_LON">10.51024821993168067991</Item>. <Item name="UR_LAT">-0.00362308494158708949</Item>. <Item name="UR_LON">10.51159206881408891832</Item>.</GDALMetadata>.
Currently, GDALMetadata is not writable. I will change this in ExifTool 11.33, but until then you can use this command:
exiftool -config my.config -tagsfromfile directory\%f.TIF -ext PNG -all:all -xmp directory2
with this my.config file:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Exif::Main' => {
0xa480 => {
Name => 'GDALMetadata',
Writable => 'string',
WriteGroup => 'IFD0',
},
},
);
1; #end
(I'm assuming that this goes in IFD0. Use "exiftool -G1 -gdalmetadata FILE" on an existing file to verify this.)
- Phil