Created
September 11, 2023 23:10
-
-
Save mihow/013da7c4ff06bd679a4b10517820f0c3 to your computer and use it in GitHub Desktop.
Load image into PIL object from URL with streaming request, one line
This file contains hidden or 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
import requests | |
from PIL import Image | |
image = Image.open(requests.get(url, stream=True).raw) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment