Skip to content

Instantly share code, notes, and snippets.

@LK64076007A
Created October 26, 2013 00:51
Show Gist options
  • Save LK64076007A/7164005 to your computer and use it in GitHub Desktop.
Save LK64076007A/7164005 to your computer and use it in GitHub Desktop.
Side by side image combine
import photos
import Image
import console
im1 = photos.pick_image(show_albums=False)
im2 = photos.pick_image(show_albums=False)
width1, height1 = im1.size
width2, height2 = im2.size
widthT = width1 + width2
foo = [height1,height2]
heightT = max(foo)
background = Image.new('RGBA', (widthT,heightT), (255, 255, 255, 0))
console.clear()
print "Generating image..."
console.show_activity()
background.paste(im1,(0,0))
background.paste(im2,(width1,0))
photos.save_image(background)
console.hide_activity()
print "Image saved to camera roll."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment