Skip to content

Instantly share code, notes, and snippets.

View Tendro's full-sized avatar

Tendro Ramaharitra Tendro

View GitHub Profile
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
def get_exif_data(image):
"""Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags"""
exif_data = {}
info = image._getexif()
if info:
for tag, value in info.items():
decoded = TAGS.get(tag, tag)