Create a mosaic image

Determine the number of tiles (Option -X)

To create a mosaic image you first need to have a main image.

Then you need to decide how many small pictures will be placed from left to right. Lets say we want to have 80 images. This number will be used together with the command line option -X.

The number of tiles from top to bottom is adjusted proportionally.

Calculate the resolution of the result image (Option -p)

Next you need to decide what resolution your image should have. Printers have a resolution of e.g. 1200 dpi. To calculate the size of one pixel image you could use this formula.

p=res/2.54*sz

  • p: Number of pixels for one small image
  • res: Resolution in dpi
  • sz: Size of one tile image after printing in cm

In our example we have a resolution of 1200dpi and we want to have 1 cm sized images. Thus we need 472 pixels for each small image.

Enter: GetAMosaic -i base.jpg -o out.jpg -p 472 -X 80

The result image will be 472*80 pixels wide.

Overlay (Option -O)

If the source image has very fine details that are smaller than one tile, then it might look good if you overlay the original image above the mosaic image. With the option -O You can determine how many percent the original image should be mixed in.

Adding noise (Option -n)

If you have in your source image a very uniform area chances are that the same image will be used over and over again. To improve this with this option you can add noise to each pixel in the source image to randomize the image selection a little.

-n 20 adds noise of amplitude 20 to the red green and blue colors of each pixel.