Skip to content

Writing custom metadata tags #40

@sergiobellido

Description

@sergiobellido

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions