Load image from file

from PIL import Image

    image1 = Image.open("C:/MyDirectory/myimage.jpg")

Load image from URL

import requests
import io
from PIL import Image

    response = requests.get(request_url, auth=auth)
    if response.status_code == 200:
        image1 = Image.open(io.BytesIO(response.content))
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *