Create Photo Mosaics with Metapixel

I've always thought that mosaics were an interesting art form, so when I ran across Metapixel a while back I noted it as an app worth checking out. Metapixel is a single purpose tool, but it does its job very well. In no time you can create an impressive photo mosaic using your existing photos and a couple commands.

Metapixel runs from the command line, but I'll give you the step by step that makes it very easy to use.

Step 1
Chose the image you would like to create a photo mosaic to look like. I chose the Linux App Finder logo.

Step 2
Determine the directory that contains the photos you want to use to create the mosaic. Once you have done both of those, it's time to launch your terminal and really get the work started.

Step 3
Create a directory for temporary images to be used in Step 4. It can be deleted once the final step is complete.

Step 4
Metapixel requires an initial step to prepare the images. This step copies photos from the directory you identified in the previous step and resizes them to uniform dimensions. For those of you who immediately ask what size, the answer is 128 pixels x 128 pixels, although it can be modified by adding the --width=64 and --height=64 options to the following command. You could also pick a size different than 64. What size you use should be dependant upon the resolution of the image you picked in Step 1. Feel free to experiment until the final image looks how you want it.

metapixel-prepare -r srcdir destdir

The -r option makes it so photos in subdirectories are included. srcdir should be replaced with the directory name that you identified in Step 2. destdir should be replaced with the name of the directory you created in Step 3.

The prepare step can take a while to run, but actually creating the image took less than 30 seconds on my laptop running a 1.86GHz Core Duo.

Step 5
Now that the groundwork has been prepared, creating the photo mosaic is a simple affair.

metapixel --metapixel source.jpg output.png --library destdir

source.jpg should be replaced by the name of the image chosen in Step 1. output.png is the name of the file that will contain the photo mosaic itself. Change it to whatever name you'd like. And finally, destdir gets replaced with the name of the directory that you created in Step 3.

A short time after executing this command you should have your very own, custom, photo mosaic. Enjoy!