Skip to content

Instantly share code, notes, and snippets.

@drdrang
Created November 16, 2013 03:32
Show Gist options
  • Save drdrang/7495576 to your computer and use it in GitHub Desktop.
Save drdrang/7495576 to your computer and use it in GitHub Desktop.
Create a new image from two screenshots chosen from the Camera Roll. Clean the statusbars of both screenshots using the Cleanbar.py module (https://gist.github.com/drdrang/7365980).
import Image
from Cleanbar import cleanbar
import console, photos
s1 = cleanbar(photos.pick_image())
s2 = cleanbar(photos.pick_image())
w = s1.size[0] + s2.size[0] + 60
h = max(s1.size[1], s2.size[1]) + 40
ss = Image.new('RGB', (w,h), '#888')
ss.paste(s1, (20, (h - s1.size[1])/2))
ss.paste(s2, (s1.size[0] + 40, (h - s2.size[1])/2))
console.clear()
ss.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment