#!/bin/python3 import argparse from PIL import Image from PIL.TiffTags import TAGS ################################################################################ # Arguments ################################################################################ parser = argparse.ArgumentParser( prog = "parse.py", description = "Parse LSI HDR negative", add_help = True ) parser.add_argument( "file" ) args = parser.parse_args() ################################################################################ # Script ################################################################################ img = Image.open( args.file ) print( img.format, img.size, img.mode ) for tag in 256,257,258,262,271,272,34665,305: print( f"{TAGS[tag]} ({tag}) = {img.tag_v2[tag]}")