Created
February 5, 2010 20:44
-
-
Save hktechn0/296207 to your computer and use it in GitHub Desktop.
PIL Image get from web (urllib2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import urllib2 | |
import Image | |
import cStringIO | |
imgdata = urllib2.urlopen("http://www.google.co.jp/intl/ja_jp/images/logo.gif").read() | |
img = Image.open(cStringIO.StringIO(imgdata)) | |
img.save("goog.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks buddy , was stuck after moving from urllib