from PIL import Image 
from PIL.ExifTags import TAGS 
  
image = Image.open("img2.jpg")  
exifdata = image.getexif() 
  
for tagid in exifdata: 
    tagname = TAGS.get(tagid, tagid) 
    value = exifdata.get(tagid) 
    print(f"{tagname:25}: {value}") 