Created
October 26, 2013 00:51
-
-
Save LK64076007A/7164005 to your computer and use it in GitHub Desktop.
Side by side image combine
This file contains hidden or 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 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