Created
July 18, 2017 00:15
-
-
Save gavinmh/08de9e558e7c51f9356f008d47f214b5 to your computer and use it in GitHub Desktop.
Download image into buffer
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
import requests | |
from PIL import Image | |
from StringIO import StringIO | |
r = requests.get('https://example.com/image.jpg') | |
i = Image.open(StringIO(r.content)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment