Skip to content

Instantly share code, notes, and snippets.

@patrickwebs
Created November 18, 2011 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickwebs/1377555 to your computer and use it in GitHub Desktop.
Save patrickwebs/1377555 to your computer and use it in GitHub Desktop.
Simple image resizer
#!/usr/bin/env python
import sys
from PIL import Image
if __name__ == "__main__":
if len(sys.argv) != 3:
print >>sys.stderr, "Usage: %s [INPUT] [OUTPUT]" % sys.argv[0]
sys.exit(1)
img = Image.open(sys.argv[1])
img = img.resize((1000, 1000))
img.save(sys.argv[2], quality=90)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment