def CombineScreens(): # Distance from left side of final image base = 0 # Pixels between screenshots in final image offset = 14 # Number of screenshots to combine total = 2 # iPhone 5 resolution height = 1136 width = (640 * total) + ((offset * total) - offset) # Create image background background = Image.new('RGB', (width, height), 'white') for i in range(total): screenshot = photos.pick_image(show_albums=True) if mode == 1: background.paste(screenshot, (base, 0)) elif mode == 2: cleanbar(screenshot) background.paste(screenshot, (base, 0)) base = base + screenshot.size[0] + offset background.show() # Upload to Dropbox folder from WorkPics import WorkPic WorkPic(background)
def CombineScreens(): # Distance from left side of final image base = 0 # Pixels between screenshots in final image offset = 14 # Number of screenshots to combine total = 2 # iPhone 5 resolution height= 1136 width = (640*total) + ((offset*total)-offset) # Create image background background = Image.new('RGB', (width,height), 'white') for i in range(total): screenshot = photos.pick_image(show_albums=True) if mode == 1: background.paste(screenshot,(base,0)) elif mode == 2: cleanbar(screenshot) background.paste(screenshot,(base,0)) base = base + screenshot.size[0] + offset background.show() # Upload to Dropbox folder from WorkPics import WorkPic WorkPic(background)
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()
# https://gist.github.com/viticci/2e466ff4e6b3425aba3c import Image import photos import console import ImageOps # Pick screenshots to combine screenshot1 = photos.pick_image(show_albums=True) screenshot2 = photos.pick_image(show_albums=True) screenshot3 = photos.pick_image(show_albums=True) mode = console.alert('Create or Clean', 'Select a mode below.', 'Create Now', 'Clean First') if mode == 2: from Cleanbar import cleanbar cleanbar(screenshot1) cleanbar(screenshot2) cleanbar(screenshot3) # Creates final image console.clear() print "Creating final image..." background = Image.new('RGBA', (1850,1275), (255, 255, 255, 255)) file1 = screenshot1.resize((545,969),Image.ANTIALIAS) file2 = screenshot2.resize((700,1245),Image.ANTIALIAS) file3 = screenshot3.resize((545,969),Image.ANTIALIAS) file1 = ImageOps.expand(file1,border=1,fill='gray') file2 = ImageOps.expand(file2,border=1,fill='gray') file3 = ImageOps.expand(file3,border=1,fill='gray')
import Image import photos import console import ImageOps # Pick screenshots to combine screenshot1 = photos.pick_image(show_albums=True) screenshot2 = photos.pick_image(show_albums=True) screenshot3 = photos.pick_image(show_albums=True) mode = console.alert('Create or Clean', 'Select a mode below.', 'Create Now', 'Clean First') if mode == 2: from Cleanbar import cleanbar cleanbar(screenshot1) cleanbar(screenshot2) cleanbar(screenshot3) # Creates final image console.clear() print("Creating final image...") background = Image.new('RGBA', (1850, 1275), (255, 255, 255, 255)) file1 = screenshot1.resize((545, 969), Image.ANTIALIAS) file2 = screenshot2.resize((700, 1245), Image.ANTIALIAS) file3 = screenshot3.resize((545, 969), Image.ANTIALIAS) file1 = ImageOps.expand(file1, border=1, fill='gray') file2 = ImageOps.expand(file2, border=1, fill='gray') file3 = ImageOps.expand(file3, border=1, fill='gray')