Skip to content

Commit

Permalink
Fix #82
Browse files Browse the repository at this point in the history
  • Loading branch information
atomprobe-tc committed Oct 25, 2024
1 parent 75050fc commit c5d478e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pynxtools_em/parsers/image_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def get_tags(self):
# for an overview of tags
# https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml
with Image.open(self.file_path, mode="r") as fp:
self.tags = {TAGS[key]: fp.tag[key] for key in fp.tag_v2}
self.tags = {}
for key in fp.tag_v2:
if key in TAGS:
self.tags[TAGS[key]] = fp.tag_v2[key]
if self.verbose:
for key, val in self.tags.items():
print(f"{key}, {val}")

0 comments on commit c5d478e

Please sign in to comment.