Skip to content

Instantly share code, notes, and snippets.

@viticci
Created January 23, 2014 19:41
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viticci/8585400 to your computer and use it in GitHub Desktop.
Save viticci/8585400 to your computer and use it in GitHub Desktop.
SaveImage
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