Skip to content

Instantly share code, notes, and snippets.

@mihow
Created September 11, 2023 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mihow/013da7c4ff06bd679a4b10517820f0c3 to your computer and use it in GitHub Desktop.
Save mihow/013da7c4ff06bd679a4b10517820f0c3 to your computer and use it in GitHub Desktop.
Load image into PIL object from URL with streaming request, one line
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