python import image code example
Example 1: python download image
import urllib.request
image_url = 'https://bit.ly/2XuVzB4' #the image on the web
save_name = 'my_image.jpg' #local name to be saved
urllib.request.urlretrieve(image_url, save_name)
Example 2: PIL image example
>>> from PIL import Image
>>> im = Image.open("image.jpg")
>>> im.show()
Example 3: import Image
pip install pillow
from PIL import Image, ImageDraw