Skip to content

Instantly share code, notes, and snippets.

@darkseed
Created September 2, 2012 17:41
Show Gist options
  • Save darkseed/3602102 to your computer and use it in GitHub Desktop.
Save darkseed/3602102 to your computer and use it in GitHub Desktop.
python Wand library example
#!/usr/bin/env python
# encoding: utf-8
from wand.image import Image
with Image(filename='inputimagefile.tiff') as img:
print img.format
with img.convert('jpeg') as converted:
converted.save(filename='outputimage.jpg')
converted.resize(72,72)
converted.save(filename='outputimage_thumbnail.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment