I would like to write custom metadata tags in a .tiff image.
The problem is that the library or exiftool program does not recognize the tags as standard format and they are not written in the metadata parameters at image. It only recognizes the 'Exposure' tag and writes as an XMP tag.
The code I am using to write is:
image = "IMG_1_2.tiff"
message_1 = "-Exposure=300"
message_2 = "-Gain=16"
exiftoolPath = os.environ.get('exiftoolpath')
with exiftool.ExifTool(exiftoolPath) as et:
et.execute(message_1.encode('utf8', 'ignore'), image.encode('utf8', 'ignore'))
et.execute(message_2.encode('utf8', 'ignore'), image.encode('utf8', 'ignore'))
The code for reading metadata:
image = "IMG_1_2.tiff"
exiftoolPath = os.environ.get('exiftoolpath')
with exiftool.ExifTool(exiftoolPath) as exift:
metadata = exift.get_metadata(image)
Attached is the image.
Any help would be appreciated.
Thanks.
I would like to write custom metadata tags in a .tiff image.
The problem is that the library or exiftool program does not recognize the tags as standard format and they are not written in the metadata parameters at image. It only recognizes the 'Exposure' tag and writes as an XMP tag.
The code I am using to write is:
The code for reading metadata:
Attached is the image.
Any help would be appreciated.
Thanks.