#!/usr/bin/env python # # exif.py - Display EXIF data # # Copyright 2017 Todd Shadburn # # Licensed under the GNU GPL version 2 # import sys import exifread if len(sys.argv) < 2: print 'Usage: exif.py imagefile' sys.exit(2) # Open image file for reading (binary mode) f = open(sys.argv[1], 'rb') # Return Exif tags tags = exifread.process_file(f) f.close() for tag in tags.keys(): if tag not in ('JPEGThumbnail', 'TIFFThumbnail', 'Filename', 'EXIF MakerNote'): print '%s = %s' % (tag, tags[tag])