summaryrefslogtreecommitdiff
path: root/wpcreator/generator.py
diff options
context:
space:
mode:
Diffstat (limited to 'wpcreator/generator.py')
-rw-r--r--wpcreator/generator.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/wpcreator/generator.py b/wpcreator/generator.py
new file mode 100644
index 0000000..7f22c55
--- /dev/null
+++ b/wpcreator/generator.py
@@ -0,0 +1,21 @@
+import pygtk
+pygtk.require ("2.0")
+import gtk
+import cairo
+
+from PIL import Image
+
+def assemble (images):
+ full_width = 0
+ full_height = 0
+ for image in images:
+ width, height = image.size
+ full_width += width
+ full_height = max (height, full_height)
+ dest = Image.new ("RGB", (full_width, full_height))
+ x = 0
+ for image in images:
+ width, height = image.size
+ dest.paste (image, (x, 0))
+ x += width
+ return dest