I would like to find the dimensions of an image on the internet. I tried using
from PIL import Image import urllib2 as urllib fd = urllib.urlopen(\"http://a/
This answer is 4 years ago, but it's still on top in Google.In Python3, we have simple solution.
from urllib.request import urlopen img =Image.open(urlopen('http://dl.iplaypython.com/images/banner336x280.jpg')) new_img =img.resize((300,500),Image.ANTIALIAS) new_img.save('url.jpg','jpeg')