This commit is contained in:
Michał Gdula 2023-08-04 17:34:08 +00:00
parent 4c7bf9706f
commit d19a33501a
36 changed files with 808 additions and 1052 deletions

View file

@ -18,10 +18,10 @@ def yoink(file_path):
"""
if not os.path.isfile(file_path):
return None
img_exif = {}
file = Image.open(file_path)
img_exif["FileName"] = os.path.basename(file_path)
img_exif["FileSize"] = os.path.getsize(file_path)
img_exif["FileFormat"] = img_exif["FileName"].split(".")[-1]
@ -34,9 +34,9 @@ def yoink(file_path):
img_exif[value] = tags[tag]
except TypeError:
pass
file.close()
return _format_data(img_exif)