Photomosaics: What They Actually Are
A picture made up of smaller pictures is called a photomosaic. That's the technical term, though people often just call them mosaics or collages and argue about the distinction online. The real definition is pretty narrow: a photomosaic uses small source images, each one replacing a portion of a larger target image, where the color and brightness of that small image approximate the underlying pixel it sits in. If you've ever seen that giant composite image of the Statue of Liberty that looks like a portrait from far away but resolves into hundreds of tiny photos when you step close, that's a photomosaic. Not a collage. Not a grid. A specific thing with a specific algorithm behind it. It's called a photomosaic, and the technique was popularized by Stephen Wolfram back in 1997 when he published the first book-length treatment of the subject. He wrote a program that could generate one, and that program is essentially the ancestor of everything you'll find today. The core idea is straightforward enough: you take a target image, divide it into a grid of cells, then for each cell you find the source image whose average color most closely matches that cell. You lay those images down and you get the composite. The trick is making it look decent instead of like a broken JPEG. I spent way too long perfecting photomosaic generation for a print project a few years back. The client wanted a 36-inch by 48-inch mosaic made from roughly two thousand individual photographs. I had the software, I had the images, and I still managed to mess it up twice before getting it right. The first attempt failed because I didn't account for the aspect ratios of the source images. I'd assumed they were all roughly square, but about forty percent of them were landscape or portrait oriented, and that threw off the grid alignment in a way that was only visible at full resolution. I ended up resizing everything to a uniform crop before feeding it into the generator. The second failure was more subtle. I was working with sRGB images but the printer was using a different color profile, and the output came back looking duller than expected because the source images were subtly shifted in hue. I re-exported everything in Adobe RGB and the print matched the preview almost perfectly. That one cost me about six hours of re-rendering.
How It Actually Works
The algorithm isn't complicated, but the implementation details are where people run into problems. Here's the pipeline: you load your target image and your source image library, you compute the average color of every source image, you divide the target into a grid, and then you match each grid cell to its nearest neighbor in color space. The matching is typically done in RGB or sometimes LAB color space. LAB tends to produce better results because it's perceptually uniform, meaning the distance between two colors in LAB space corresponds more closely to how humans actually perceive those differences. If you're matching in pure RGB, you'll get banding artifacts and the transitions between adjacent tiles will look jarring. The grid size is the most important parameter you'll tune. A 20 by 20 grid gives you four hundred tiles. A 50 by 50 grid gives you twenty-five hundred. More tiles means a sharper underlying image but also more demand on your source library. If your source library is small relative to your grid count, you end up repeating images, and the mosaic starts looking like a pattern instead of a photograph. I usually recommend a minimum of five to ten source images per grid cell as a rule of thumb, though that depends entirely on how uniform your source set is. Another thing that matters a lot is the overlap setting. Some generators allow adjacent tiles to share border pixels so the seam between them is softer. Without overlap, you get hard edges on every single tile, which works fine for abstract or highly detailed source images but looks amateurish if your sources are smooth gradients or solid colors. I tend to use a two-pixel overlap on anything larger than thirty by thirty grid.
Tools You Can Actually Use
There are a handful of tools that handle photomosaic generation, and most of them are fine for casual use. The ones worth looking at depend on whether you want a desktop application or something you run in a browser. Mosaic Maker is a free Windows utility that's been around for over a decade. It's not the prettiest interface, but it gets the job done and supports custom grid sizes, overlap adjustment, and source image sorting by color or brightness. It's the kind of tool that looks like it was written in 2003 and hasn't needed an update since. That's not a criticism. It just works. PhotoMosaic.com is an online service. You upload your target image and your source photos, pick a grid size, and it generates the mosaic in the browser. The free tier is limited in resolution and watermarking is applied to the output, but it's useful for quick tests before committing to a full render on desktop software. The upside is that you don't need to install anything. The downside is that large source sets can time out if your internet connection isn't stable.
Get the Full Details

For people who want more control, there's a Python library called photomosaic on GitHub. It's command-line driven and requires you to have Python 3.8 or later installed. It handles color matching in LAB space by default, supports multiple source directories, and lets you export the final image at whatever resolution you need. The rendering speed scales with your CPU, so a 40 by 40 grid with two thousand source images on a modern machine takes roughly three to five minutes. Older hardware or very large grids can push that to twenty minutes or more. ImageMagick can also generate mosaics through its command line, though it's more of a workaround than a dedicated tool. It's powerful if you already have it installed and are comfortable writing shell commands, but the output quality won't match dedicated software without significant post-processing.
Common Mistakes That Ruin the Output
The biggest mistake I see people make is using a source library that's too narrow in content. If every photo in your library is a sunset, no matter how good the color matching is, the final mosaic will look like a wall of orange. The source images should have variety in both subject matter and color distribution. I usually scan through my library and filter out anything that's more than sixty percent a single dominant color unless that's the effect I'm going for intentionally. Another issue is resolution mismatch between the target and the source images. If your target is a high-resolution photograph and your source images are mostly low-resolution phone shots, the mosaic will look soft and muddy. I recommend all source images be at least three hundred by three hundred pixels, and ideally much larger if you're printing at a big size. There's no point in generating a gorgeous mosaic only to have it fall apart when you zoom in or print it. People also tend to pick grid sizes that are too large for their source library. A hundred by a hundred grid with only two hundred source images means eight repeats per tile on average, and the repetition becomes obvious within a few feet. I always calculate the source-to-tile ratio before I start rendering. If the ratio is below five, I either increase the source count or reduce the grid size.
When Photomosaics Just Don't Work
Not every target image is a good candidate. Highly saturated images with large areas of identical color tend to produce muddy results because the algorithm has no good source to assign to those regions. If your target is something like a blue sky with no clouds, every tile in that area will get mapped to the bluest source image you have, and you'll end up with a block of identical images that destroys the illusion of the underlying photo. I deal with this by painting a slight gradient or texture into those uniform regions of the target before generating the mosaic, or by using a mask to exclude those areas from the tiling process entirely. Text and thin lines are another problem area. The algorithm works on average color per cell, so fine details get averaged out and lost. If your target image has important text or thin structural lines, they'll disappear in the mosaic unless your grid is extremely fine and your source images are correspondingly detailed. In practice, this means you're looking at grids of at least eighty by eighty for any target that relies on fine detail, and even then the results are inconsistent. If you need something closer to a true collage where individual images remain clearly distinguishable and the composition is more artistic than algorithmic, you're better off building it manually or using a collage-specific tool. Photomosaics are great for the remote-viewing effect where the composite image reads as a single photograph from a distance. They're not great when you want the individual photos to be the focus.

My Go-To Workflow
Here's what I actually do when I need a clean result. I start by gathering and organizing the source images. I crop them to a consistent aspect ratio, usually 4:3 or 1:1 depending on the project. I run them through a batch color correction pass so nothing is wildly over or underexposed compared to the rest of the library. Then I load the target image and check its histogram. If there are large flat regions, I add some subtle noise or texture to break up the uniformity before feeding it into the generator. I set the grid size based on the intended output dimensions and the source library size. For a standard web-sized mosaic at about eighty pixels per tile, I'll use a Python script with a LAB-space matcher and two-pixel overlap. For print work, I bump the resolution up and let it render overnight if needed. After generation, I do a final check at full resolution, zooming into the edges and center to make sure there are no obvious repeating patterns or misaligned tiles. If I find issues, I adjust the source sorting or grid parameters and re-render that section. It's faster to re-render a portion than to try to fix individual tiles manually. The whole process from raw images to final mosaic usually takes me between forty-five minutes and two hours, depending on grid size and source library quality. Most of that time is spent on source image prep, not the actual generation. The algorithm itself is fast on modern hardware. The tedious part is making sure your inputs are decent.