forked from tdamdouni/Pythonista
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCombine3Pics.py
38 lines (31 loc) · 1.08 KB
/
Combine3Pics.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from __future__ import print_function
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', (866,600), (255, 255, 255, 255))
file1 = screenshot1.resize((250,444),Image.ANTIALIAS)
file2 = screenshot2.resize((320,568),Image.ANTIALIAS)
file3 = screenshot3.resize((250,444),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')
background.paste(file1,(10,77))
background.paste(file2,(272,15))
background.paste(file3,(604,77))
console.hide_activity()
background.show()
print("\n\n Image created")