Skip to content

Instantly share code, notes, and snippets.

@lu911
Last active August 29, 2015 14:16
Show Gist options
  • Save lu911/d30789431f15f9ba07aa to your computer and use it in GitHub Desktop.
Save lu911/d30789431f15f9ba07aa to your computer and use it in GitHub Desktop.
Wand Image object from image url
import urllib, cStringIO
from wand.image import Image
url = 'http://img3.wikia.nocookie.net/__cb20100520131746/logopedia/images/5/5c/Google_logo.png'
f = cStringIO.StringIO(urllib.urlopen(url).read())
i = Image(file=f)
>>> <wand.image.Image: 74d025d 'PNG' (3548x1243)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment