Created
January 23, 2014 19:41
-
-
Save viticci/8585400 to your computer and use it in GitHub Desktop.
SaveImage
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 clipboard | |
import urllib | |
import Image | |
import photos | |
import cStringIO | |
# Given an image URL in the clipboard, save the image to the iOS Camera Roll with Pythonista. Simple script with no error checks or other settings. | |
URL = clipboard.get() | |
file = Image.open(cStringIO.StringIO(urllib.urlopen(URL).read())) | |
photos.save_image(file) | |
print 'Image Saved' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment