Skip to content

Instantly share code, notes, and snippets.

@thisiswei
Created August 26, 2013 18:22
Show Gist options
  • Save thisiswei/6344745 to your computer and use it in GitHub Desktop.
Save thisiswei/6344745 to your computer and use it in GitHub Desktop.
import Image
def create_thumbnail(old_path, new_path):
img = Image.open(old_path)
img.thumbnail((200, 200), Image.ANTIALIAS)
img.save(new_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment