With ImageMagick, go to Input. Do not enter any URL. Scroll down and enter Size, 100x100; Pattern;
Metabricks.
This little bricks are hard to hit so double the size.
Go to Enhance and Negate to make the morter white.
Using Paint, set Fuzz to 10% and make the bricks transparent
At this point, the image will not tile. Using Paint with Paint Style set to None, click as close as you can to the lowest, most right point that will make it tile-able. Use the cooridinates that gives you to crop off the excess.
Note the size and save.
Make the bricks
Go to Input. Delete the URL if there is one. Scroll down and for Format, enter
Granite.
Resize it to the same size as your mortar.
Go to Composite and layer the mortar Over it.
Go to Effects and Emboss it at 1.
At this point it looks like the image on the top of this page. You can optimize to 8 colors and save it or you can play around with contrast, emboss and shade to get other looks like the one on the left.