This is what it does - http://www.flickr.com/photos/ideamonk/4020798966/sizes/l/
Code - http://github.com/ideamonk/PyMos
Now I wonder how would you generate a mosaic??
In my case I'm matching images in a collection using euclidean distance and pasting over a magnified blank image so as to form a mosaic.