Monday, November 18, 2013

How to print a large image on multiple pages, using Python!

I recently received a high-resolution image of a famous historical figure (details to come soon...). Naturally, my roommates and I wanted to print this famous person out and create a life-size cardboard cutout. Since I only have the capability to print on standard 8.5 x 11 inch paper, I needed a way to split the image onto multiple pages to print.

I found web-based tools that can do this, or you could use Photoshop or some other proprietary software, but I didn't find any good tools I could use on Ubuntu to maintain resolution. I whipped up a Python script that can do this, relying on the Pillow implementation of PIL (Python Image Library). You can download it from Github. Feel free to submit pull requests if you flesh it out further, as it is rather basic right now (it's licensed under GPLv3).
Creative Commons License
Except where otherwise noted, content on What's Life by Kyle Barlow is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.