Ubuntu/Debian:
$ sudo apt-get install metapixel
Fedora/CentOS
$ sudo yum install metapixel
Put all the images you want to use in a directory, or a set of directories so you can prepare them as tiles. The Pictures directory under your home directory might be a good place to start.
$ mkdir tiles
$ metapixel-prepare -r ~/Pictures ./tiles –width=24 –height=24
Using an image you want the mosaic to look like overall, and at least one tile library directory, create the mosaic. If you have multiple library directories, specify them one after the other with -l or –library. You can also use collage mode, -c or –collage, which will allow the tiles to overlap each other, but this will take longer to compute and may or may not look as crisp.
This is a finished photomosaic made using a Bioshock 2 picture and a set of random image tiles.

Here’s a closeup of the mosaic so you can see the individual tiles a bit better.

$ metapixel –metapixel ~/Pictures/vangogh.jpg –library=./tiles mosaic.png
If the image doesn’t look like the original vangogh you based it on, try adding scale so it can use more images or shrink the tiles to something smaller than 24×24.
If you see the same pattern repeating too often, try specifying a minimum distance between cells for repeating an image.
Error: cannot find a matching image - try using a shorter minimum distance.
If it can’t find replacements for the optimal images it was going to use, it will complain. In this case, just keep incrementing the distance until it completes.
Pictures with great detail or little contrast require larger canvases. Simple clipart works well with less tiles. Try making one out of famous paintings, abstracts or pointillist work well, like this one by Paul Signac.

$ metapixel –metapixel paul-signac_portrait-felix-feneon.jpg -l ./tiles/ -l ./tiles2/ -l ./tiles3/ –scale=15 –distance=3 output.png
This was made with 3 directories full of images and the canvas scaled 15x as large as the original jpeg. The full mosaic is really large.
$ identify output.png
output.png PNG 11584×9280 11584×9280+0+0 8-bit DirectClass 54.2mb
Nice review, But I would like to add one more photomosaic software from Artensoft wich create better resuls. Just take a look for the gallery first: http://www.artensoft.com/ArtensoftPhotoMosaicWizard/
I found that the example photomosaics and photocollages are truly amazing.
12:39 am
Photo mosaics are cool. Definitely a guru’s playground type of thing. Metapixel and Imagemagick are the types of hidden gem apps in Linux that we shouldn’t tell too many people about!! =P~ Keep quiet okay! Let the lamers continue to use Win7 and Mac junk.