Split an image of arbitrary size into NxM tiles
For some months ago I came over a website intended to automatically take an image file (<2mb), split it into a desired number of horizontal or vertical cells and give back a pdf containing the cells (http://www.blockposters.com/). This is a great way to make large artful decorations for walls or any other surface. The rasterization makes it ideal to explore what happens to the perception of the image when the space between the cells increases or decreases – very fun and somewhat creative:)
What I found missing was to take a much larger image file (>>2mb) and have it split into cells the same way, but to have it with no margins and in image files (eg. jpeg). The reason was that I thought it would be cool to have a high number of cells (>150) printed on photo paper in standard size (10x13cm?) and to maintain some quality to the picture as well – thus avoiding pixelation on the small prints, but provoking pixelation in the larger aggregated picture.
So, knowing some maths, some programming and a rainy morning in the summer, I sat down and tried to figure out the equations that would do this for me and then implement it – preferably with web-interface.
The result is a very small program designed just for me and intended to run locally by me. However, I believe in sharing knowledge and just about everything else – so the complete source for the software is attached with this post. It is extremely performance intensive – demanding huge amounts of RAM and some processing – but it works somewhat;) I found it fun to indulge in such a problem – model it in mathematics and solve it, although not perfect – but life is an exercise in limit the problem space:)
(later I found that, offcourse, many pursue this idea of altering images, weird huh?. Check out http://www.makeuseof.com/ )