You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

28 lines
786 B

#!/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]}")