Created
January 15, 2018 08:20
-
-
Save yuliji/303f2aaf842f5b0c595862672eec7dc6 to your computer and use it in GitHub Desktop.
[get exif] Python get exif of image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PIL.Image | |
img = PIL.Image.open('img.jpg') | |
exif_data = img._getexif() | |
import PIL.ExifTags | |
exif = { | |
PIL.ExifTags.TAGS[k]: v | |
for k, v in img._getexif().items() | |
if k in PIL.ExifTags.TAGS | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment