Skip to content

Instantly share code, notes, and snippets.

@mvasilkov mvasilkov/
Created Jul 10, 2017

What would you like to do?
import Image, ExifTags
try:, fileName))
for orientation in ExifTags.TAGS.keys():
if ExifTags.TAGS[orientation]=='Orientation': break
if exif[orientation] == 3:
image=image.rotate(180, expand=True)
elif exif[orientation] == 6:
image=image.rotate(270, expand=True)
elif exif[orientation] == 8:
image=image.rotate(90, expand=True)
image.thumbnail((THUMB_WIDTH , THUMB_HIGHT), Image.ANTIALIAS),fileName))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.