Reputation: 4342
I am new to python and am working with python image library. I just want to be able to open an image from the web and get the histogram from this image. Unfortunately I get the error File "new.py", line 1
from PIL import Image import urllib
and it does not work. Any idea how to get this working?
from PIL
import Image
import urllib
im = Image.open(urllib.urlopen("http://fmforums.com/forum/uploads/profile/photo-thumb-57725.jpg"))
im = im.convert("P")
print im.histogram()
Upvotes: 0
Views: 169