Mosaic Image from Photo


I've been given a project to do an was hoping to get some guidance here. Basically, I was asked to take a scenic landscape photograph and turn it into a mosaic-type of image using only 5-6 shades of a particular colour.

The image would then be used as a type of blueprint for arranging floor tiles in such a way that the tiled area would resemble the scene in the original photograph when looking at that area from a short distance away.

The tiles are rectangular in shape and contain a random mixture of shades of one colour.

Any help with this would be appreciated.
LVL 21
Julian MatzTechnical SupportAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I am installing this plug-in now and I will make a mosaic image for you to view. How detailed is the scenery? Desert scenery wouldn't be difficult, or the beach, but something like a forest might be a little more difficult to achieve. Here is the link:

I will post the image when I am finished.
Don't waste your time with the plug-in, it isn't free. Photoshop does have a built in mosaic plug-in but the options are few. I don't think you will be able to use the default PS mosaic plugin to achieve your results. I have iCandy which is a Photoshop paid plugin which has several texture options. I don't think it was very much  (maybe $30). If I find anything that will work for you I will post it. If you are short on time and have a image, I wouldn't mind helping you since I have the iCandy plugin. Just let me know.
OK, after I checked it out again, it does have a free version (you have to enter your email). I am sending the image before and after. I believe the iCandy that I use is much more adequate for this type of effect. This one has a few options but not great.
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Julian MatzTechnical SupportAuthor Commented:
Thanks Jeremy! I greatly appreciate your help.

I'd like to show you a photo of the type of tiles that will be used, but the client does not want to give too much away, so would I be able to e-mail you the photo? You can find my e-mail address under my profile here: http:/M_3540526.html

You could e-mail me and I'll reply. Just let me know.

As for the scenery image, it would be something like this I think:

I think what you've shown me could work. We just need to make the tiles more rectangular and perhaps the edges a little straighter.

Thanks again!
Here is a larger tile with straighter edges. The thing I don't care for is how uniform it makes the tiles in order to achieve the straighter edges. If this is the type of bond you want maybe this is OK. I was thinking it wouldn't be stacked bond, but maybe more of a random pattern. Also, the plug-in being used doesn't allow for me to change them from square to rectangular. It is either square, octo., or hex shaped.
Another way you could do this - albeit one requiring a tad more work, is to:

1. Add a new layer, Hide your original image.
2. Show Grid, and then add multiple horizontal and vertical Guides the size and shape that you desire. Once done, Lock Guides, and make sure Snap to Guides is on. Turn off grid.
3. Using the Marquee Tool, select one of the rectangles and then use the Fill Tool to colour it with one of the 5-6 colours you want. With the block stick Marqueed, Copy it and just start selecting other rectangles around the grid and Pasting into them. Repeat this process with the other colours. You don't need to all of them, you can probably get away with just doing 3 or 4 columns, which you can then merge and then just copy and paste to fill up the canvas quickly. Merge Visible or Merge all layers of the same colour (probably wiser).
4. Turn on the original layer, and now play with the Opacity of your coloured blocks above to give you the effect your desire.

Although clearly this is a lot more effort, it will give you more control of how the image looks. You could even darken key blocks to subtly spell out a word even...
I was unable to send you an e-mail today. I tried 3 times using both yours and the info@ addresses. Each time they were returned as undeliverable. I don't know if your email is having some issues or what is going on there. I have a sample if you can give me a link to send it to you.

For those who may find this post looking for instructions on how to achieve this effect:

I opened the photo in Illustrator and did a live trace (colors 4, min area= 1000). I used these settings to reduce the colors and detail. If you want more details just adjust the colors and reduce the min area. You can get to these settings by clicking the drop-down menu from the live trace button and selecting custom.
Sorry about that, I forgot to end the instructions.

For those who may find this post looking for instructions on how to achieve this effect:

  1. I  opened the photo in Illustrator and did a live trace (colors 4, min  area= 1000). I used these settings to reduce the colors and detail. If  you want more details just adjust the colors and reduce the min area.  You can get to these settings by clicking the drop-down menu from the  live trace button and selecting custom.
  2. Use the square tool and drag it to make a rectangle (no fill, instead use a stroke of about 2 or 3). Go to effect>transform>roughen. I used the settings 2 for the first setting, and 4 for the second. Make a few more and vary the sizes. Once you have a row, select all of the rectangles and drag down while holding alt to duplicate the row. I made 4 different rows and alternated them every once in a while to keep it from being to uniform.
  3. Now select the image that you did the live trace on (for a more realistic look just use an image without the live trace). Copy and paste into Photoshop and hide the layer. Now copy and paste the shapes we created earlier into Photoshop (the same document as the picture).
  4. Now that both the picture and the shapes are in Photoshop, make sure the shape layer is selected. Pick the magic wand tool from the toolbar and click on the stroke of one of the shapes. Go to select>similar so select all of the shapes strokes.
  5. Save your selection by going to select from the top toolbar and choosing save selection. Name the selection and save.
  6. Un-hide the picture layer and hide the shapes layer. Make sure the picture layer is selected and go to select from the top toolbar. Choose load selection, and load your previously saved selection. Now go to select>select inverse and hit delete. You should now have your picture with the strokes of the shapes subtracted from it giving the picture a mosaic look.
  7. The last step is to give the image a background. Either add a layer and drag it to the bottom or back of the layers pallett, or use the background that is already there, if you didn't paste the photo over it. Now choose a grout color and paint it on the background layer.
  8. Choose the layer that has the photograph and choose layer>drop-shadow, for a more realistic look.
David BruggeCommented:
May I suggest IMHO what I believe to be an easier method.

Start by using Image>Adjustments>Posterize to divide the photo up into the number of colors that you want. You said 5 - 6 shades of a particular color. I didn't know if that was 5 or 6 colors total, or 5 - 6 of each color.

Using the Posterize method will let you quickly evaluate how the image will look divided out into individual colors. You may find that you need more colors, or you may find that you need a different image.

After limiting the image to the number of colors that you want, then go to Filter>Pixelate>Mosaic. There you can adjust the size of your tiles to match the size of your finished image.

Here is the on-the-waqter image from above...

Yeah, that would be more simple, except they need to be rectangular not square, and it must be 3/bond like masonry.
I meant 3/4 bond
David BruggeCommented:
> Yeah, that would be more simple, except they need to be rectangular not square

Well, that does complicate things a bit. I suppose it needs to be more like this.

That looks closer. Was that with the mosaic filter?
David BruggeCommented:
Sorry, been out of the country.

> That looks closer. Was that with the mosaic filter?

I wish. That was done by activating the grid with snap to grid active and defining a marquee shape that was two grid squares wide and one grid square high, then marching across the image two squares at a time and averaging (Filter>Blur>Average) the pixels. On every other line I offset the selection by one square. Then I changed the setting on my marquee and went back and finished the remaining single squares at the ends of the odd rows.

Very tedious. I would certainly look for a coder to put this into a script.

I couldn't think of any other strategy.
Thanks for the tip. I think I am going to have to do it by hand. I will upload the image I created using the last method I described. It needed have less variation for the project. I want to include it in case anyone is trying to create this type of style. Otherwise the instructions I gave above are useless (maybe they are anyway?).


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Julian MatzTechnical SupportAuthor Commented:
Thanks for your help with this guys.

D_Brugge, I like this one:

How long did it take to make?

I sent the samples to my client, and he's very interested. He told me which one he likes the best He said "the last one" :) I'm not 100% sure which one he means, so I've asked him to e-mail it back to me just to be sure.

It could have been this one:
Julian MatzTechnical SupportAuthor Commented:
Sorry, here are the correct links, respectively:

David BruggeCommented:
It took at least an hour. I admit I wasn't necessarily suggesting this as the final solution, it's just that I was stumped by the requirements and this is the only solution that I could devise.


Start with a copy of the image that you want to work with, never the original.

I took advantage of Photoshops Grid, the Snap-To feature, and the Marquee Tool style options. I started by making an assumption that the tile would be twice as wide as it is tall. Your actual ratio of width to height might be different. For my design I chose a shape two grid squares wide and one grid square high. Yours might be three squares wide and two square high - whatever it takes to make the ratios match your actual tile, HOWEVER, you need the width to be an even number of squares (so that you can offset the tiles by half) so if your ratio is 3 wide to 2 high, use 6 wide and 4 high. Have I confused you yet?

The number of squares that you use for a tile, determines how many squares across you make your grid. For instance, you want your finished mosaic to be 100 tiles wide, and your tile on the photoshop image is going to be 2 grid squares wide, you need your grid to be 200 squares wide.

You can adjust this in one of two ways. You can increase or decrease the number of pixels in the image, or (the better way) adjust the grid using Image>Preferences>Grid, Guides, & Slices settings. Or a combination of both.

Once you have your Grid set up, and you have determined how many squares of the grid will be a tile, measure the size of your tile in pixels. There are several ways you can measure an area in Photoshop, but for this type of measurement I like to use the marquee tool to select an area of my image that is the correct width and height and copy it to the pasteboard. Then I press Crtl + N for New File. Photoshop will ask you if you want to open a new file with the dimensions of the section that you just copied and will show you the dimensions in pixels.

Copy these down and press cancel. With your marquee tool still selected, select Fixed Size in the option bar at the top of the screen. Then fill in the dimensions in pixels that you just wrote down. Now go to View>Snap To and make sure Grids is checked. Now, every time that you click on the grid, a selection the exact size of one of your tiles is selected.


You said that you wanted to limit the colors to 5 or 6. Do this by selecting Image>Adjustments>Posterize. With preview selected, select the number of colors that you want. If the results are not pleasing, you may want to cancel this step (or undo it) and adjust the image such as the colors, or the lightness and darkness, or the contrast and try again.

Once you have settled on the number of colors, starting in the upper corner, make a selection and press Filter>Blur>Average. Because you are going to be doing this a lot, I suggest that you assign a single key stroke to this command. You can do that by going to Edit>Keyboard Shortcuts, scrolling down to Filter>Blur>Average and assigning an F key or a key combination. I like to use F2 which replaces the "cut" command because I always use Ctrl+C to "cut" anyway and never use F2.

Now, just march across a row, averaging each tile. If you end up with a section that is less than a full tile skip it. On the second row, move over half a tile width and begin your selection process, ignoring the half a tile at the beginning of the row. (This is why you needed the width of your tile to be an even number of squares.)

Once you are finished with your rows, change the marquee style to normal and then select and average the remaining leftover sections.

Yes, it takes a long time, but not as long as laying out the actual tiles!

If you determine a better way, be sure to post it here and share it with us.
I have been very busy lately designing a few websites I picked up, so I haven't had much time. I was wanting to finish this, but I am going to send what I have. I don't want to waste time if it isn't what they are looking for. Let me know what you think. The edges where the Mnts. would meet the sky or water would have to be something else.

Julian MatzTechnical SupportAuthor Commented:
Thanks D_Brugge, for the detailed instructions!

Jeremy, that looks good too. I'm still waiting for some feedback from my client, but I think he had a business trip to Italy, so I'll chase him again to get his thoughts.

I appreciate all your help so far, and also your patience.
Julian MatzTechnical SupportAuthor Commented:
Sorr guys! I don't want to keep you waiting any longer so I'm going to close this now. Besides, I think you have both given me enough information to move ahead when they eventually get back to me about this.

As always, many thanks!
Julian MatzTechnical SupportAuthor Commented:
I wish I had more points to give :) I hope it was fair though all the same.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Creative Suite CS

From novice to tech pro — start learning today.