Skip to content

Instantly share code, notes, and snippets.

@hashABCD
Created March 12, 2022 00:52
Show Gist options
  • Save hashABCD/fdd736afab4b42a982ccefed4bffd504 to your computer and use it in GitHub Desktop.
Save hashABCD/fdd736afab4b42a982ccefed4bffd504 to your computer and use it in GitHub Desktop.
Extract Metadata using python
# Import Libraries
from PIL import Image
from PIL.ExifTags import TAGS
# Open Image
img=Image.open('img.jpg')
#Get EXIF Data
exif_table={}
for k, v in img.getexif().items():
tag=TAGS.get(k)
exif_table[tag]=v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment