Skip to content

Instantly share code, notes, and snippets.

@lukasmartinelli
Last active October 21, 2015 13:27
Show Gist options
  • Save lukasmartinelli/b090409819f083b0f0a2 to your computer and use it in GitHub Desktop.
Save lukasmartinelli/b090409819f083b0f0a2 to your computer and use it in GitHub Desktop.
Handle user uploaded images in Python
from img_rotate import fix_orientation
from PIL import Image
def fix_img(img):
proper_img = fix_orientation(img)
proper_img.thumbnail(1500, 1500), Image.ANTIALIAS)
return proper_img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment