Created
April 27, 2023 22:31
-
-
Save konverner/8f80703bdfe2dc577270845ba3da313d to your computer and use it in GitHub Desktop.
Read image with PIL from url
This file contains 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
from PIL import Image | |
import requests | |
from io import BytesIO | |
url = 'https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png' | |
response = requests.get(url) | |
img = Image.open(BytesIO(response.content)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment