I am trying to update certain tiff tag value using the GDAL python binding.
for example, using tiffinfo I can read the tags value from the image, it is something like this:
TIFF Directory at offset 0x8 (8)
Image Width: 4172 Image Length: 3689
Tile Width: 256 Tile Length: 256
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: JPEG
Photometric Interpretation: YCbCr
Samples/Pixel: 3
Planar Configuration: single image plane
Tag 33550: 60.000000,60.000000,0.000000
Tag 33922: 0.000000,0.000000,0.000000,588840.000000,4880460.000000,0.000000
Tag 34735: 1,1,0,7,1024,0,1,1,1025,0,1,1,1026,34737,22,0,2049,34737,7,22,2054,0,1,9102,3072,0,1,32618,3076,0,1,9001
I want to update “Tag 33922” with a different value without saving a new image.
But I couldn’t find a method to update the tag value in the GDAL python API.
Did I miss something or this is just simply not supported in GDAL python binding?
Thanks
Jie
Thanks cgohlke for showing me the libtiff wrapper in python. I ended up writing C# code using the LibTiff.Net API. It looks something like this: