Skip to content

Commit 5916c99

Browse files
committed
Test script to combine images
1 parent 1aaa497 commit 5916c99

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

combineImages.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/python
2+
3+
from PIL import Image
4+
5+
file1 = "icons/Things20a2af7a.png"
6+
file2 = "icons/Things20a48bba.png"
7+
file3 = "icons/Things20a40033.png"
8+
9+
# Load individual pictures
10+
im1 = Image.open(file1)
11+
im2 = Image.open(file2)
12+
im3 = Image.open(file3)
13+
14+
# Create superset (empty) picture
15+
final = Image.new('RGBA',(512, 512))
16+
17+
# Paste the three images
18+
final.paste(im1, (0, 0), im1)
19+
final.paste(im2, (256, 0), im2)
20+
final.paste(im3, (0, 256), im3)
21+
22+
# Save the composite image
23+
final.save("final.PNG")

0 commit comments

Comments
 (0)