Created
September 11, 2018 05:31
-
-
Save slaysd/43a76633cfd30c6df17081ce35ce69cc to your computer and use it in GitHub Desktop.
gif2jpg 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 urllib2 as urllib | |
import io | |
fd = urllib.urlopen("http://a/b/c") | |
image_file = io.BytesIO(fd.read()) | |
im = Image.open(image_file) | |
im = im.convert('RGB') | |
im.save('example.jpg') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment