exif / src /test_exif.py
xtremekratos's picture
init
1516b25
Raw
History Blame Contribute Delete
545 Bytes
import exifread
import sys
def test_exif(path):
with open(path, 'rb') as f:
tags = exifread.process_file(f, details=True)
for tag in sorted(tags.keys()):
if 'MakerNote' in tag:
print(f"{tag}: {tags[tag]}")
if __name__ == "__main__":
test_files = [
"inputs/tests/12_ip17pm.HEIC",
"inputs/tests/3_nthn3ap.jpg",
"inputs/tests/24_pxl9.jpg",
"inputs/tests/18_opnord.jpg"
]
for p in test_files:
print(f"\n--- Checking {p} ---")
test_exif(p)