Photo Mosaic Maker
Operator: Abdulla Al Fahad. How tools are built and checked
A mosaic of 192 cells filled from 24 photos shows the trade-off in numbers. If every cell may take its best match, the average colour gap is 2.0 on the CIELAB scale (about one just-noticeable difference), but 176 cells sit beside a copy of their own tile and only 16 of the 24 photos are used.
Limit each photo to 8 uses, the least that can fill the grid, and the gap rises to 4.9. Turn on the no-neighbour rule as well and it is 7.6, with no photo touching itself.
This page lets you set that trade-off. The main picture is cut into a grid of 16 to 120 columns, every cell takes a tile photo by colour, and a reuse limit, a neighbour rule and a tint decide how even the result looks.
Key features
- Up to 400 tile photos, each cropped to a square from its centre
- A reuse limit from 1 to 50 uses per tile, with the minimum tile count shown for your grid
- Matching by average colour or by four quadrant colours, in CIELAB
- A tint of 0 to 70 percent from the main picture, saved as a PNG or JPG of up to 36 million pixels
How tiles are matched, limited and tinted
The main picture is cut into 16 to 120 columns of square cells; the row count follows the picture's shape, up to 20,000 cells in all. Tile photos are PNG, JPG, WEBP, GIF (first frame) or BMP up to 25 MB, read once at 128 by 128 pixels. In the saved file each tile is drawn at 16 to 128 pixels, so 48 columns at 64 px give a picture 3072 px wide.
The saved mosaic can hold at most 36 million pixels and 12,000 pixels on a side, and the page names the limit when a setting goes over. PNG keeps every tile exact; JPG is saved at quality 92. The preview is drawn at a smaller tile size than the file, so fine tint differences are easier to judge in the saved image.
How it works
Each cell and each tile is reduced to colours in CIELAB: the average of all its pixels and the averages of its four quadrants. Transparent pixels count as white. Matching by average compares three numbers; matching by quadrants compares twelve, so a tile that is light on top and dark below suits a cell with the same split, which follows edges and horizons better.
Cells are visited in a seeded random order, and each takes the closest tile that still has uses left and, when the neighbour rule is on, is not already on one of its four sides. A random order stops one corner of the picture from using up the best photos; the Shuffle button changes the seed. The tint then lays the cell's own average colour over the tile at the chosen opacity.
Typical uses
- A 3:4 portrait at 40 columns is 40 x 53 = 2,120 cells. With 120 party photos and a limit of 18 uses each the grid can be filled (the minimum is 118 tiles), and no photo appears more than 18 times.
- A yearbook cover from 300 student photos: a square picture at 30 columns is 900 cells, and a limit of 3 needs exactly 300 tiles, so every student is used 3 times.
- A thank-you card from 60 trip photos: a 3:2 picture at 24 columns is 24 x 16 = 384 cells, a limit of 7 needs at least 55 tiles, and a tint of 20 percent keeps the portrait readable from across the room.
Building one
- Choose the main picture.
- Add the tile photos; a progress bar shows each one being read.
- Set the columns, reuse limit, neighbour rule and tint, and check the preview and the figure for the average colour gap.
- Press Download mosaic to save the PNG or JPG.
Example
16 x 12 grid (192 cells), 24 solid tiles from red to blue, a red-to-blue gradient as the main picture
limit 8, no neighbour rule
limit 12 or more, no neighbour rule
limit 8, neighbour rule onAverage colour gap, tiles used, cells touching their own tile
4.9, 24 tiles, 93 cells
2.0, 16 tiles, 176 cells
7.6, 24 tiles, 0 cellsThings to check before you rely on it
The reuse limit is a ceiling, not a target. When the grid and the limit leave spare capacity, some photos are used fewer times or not at all: the example above uses 16 of 24 tiles when the limit allows 12 uses.
Quadrant matching never rotates a tile, so a photo with a bright sky only suits cells that are lighter in their top half.
A very large main picture is scaled to 2048 px on its long side before cells are measured; detail smaller than a cell is averaged away by design.
- Choose tiles for colour spread, not subject. Twenty-four photos that are all green and grey leave the reds and blues of a portrait with nothing close, and no reuse limit fixes that; the colour gap figure under the preview shows it early.
- Tint hides a poor match better than it hides repetition. At 15 to 30 percent the main picture reads from a distance while each tile stays recognisable up close; at 50 percent and more the tiles become little more than textured blocks of colour.
Common errors and how to fix them
- 192 cells with each tile used at most 2 times needs at least 96 tiles, and there are 24
- Add tiles, raise the reuse limit or use fewer columns. The minimum is the number of cells divided by the limit, rounded up.
- The size is over the 36 million pixel limit
- Pick a smaller tile size or fewer columns. A 120-column grid of a 3:2 picture is 120 x 80 cells, so tiles of 60 px or less fit within the limit and 64 px does not.
What the colour gap figure means
The figure under the preview is the CIE76 distance between each cell's average colour and its tile's average colour, averaged over the grid. CIE76 is the straight-line distance in CIELAB, and a value near 2.3 is about the smallest difference most people can see when two colours sit side by side.
A gap of 2 means the tiles are as close as the photos allow; 5 to 8 is normal under a tight reuse limit and is a visible but usually acceptable shift that the tint can pull back toward the main picture.
Frequently asked questions
How many photos do I need?
At least the number of cells divided by the reuse limit, rounded up. For a 30-column square picture (900 cells), 3 uses per tile needs 300 photos, 2 uses needs 450 and 1 use needs 900.
Why are some tiles never used?
Each cell takes the closest tile that is still available, so photos whose colours match nothing in the main picture are left over. Adding photos with the missing colours improves the result more than changing settings.
How is this different from a photo collage?
A collage arranges photos in frames and every photo is the point. Here the tile photos are only material for one larger picture, so they are chosen by colour and cropped to squares; the Photo Collage Maker on this site is the page for framed layouts.