Professional Documents
Culture Documents
How To Create A Cool Photo Mosaic On Linux With Polyfoto
How To Create A Cool Photo Mosaic On Linux With Polyfoto
Polyfoto
makeuseof.com/create-cool-photo-mosaic-on-linux
Home
Linux
Readers like you help support MUO. When you make a purchase using links on our site, we
may earn an affiliate commission.
By
David Rutland
Published 3 hours ago
If you've got a lot of images that you want to turn into a photo mosaic, consider installing
Polyfoto, a CLI tool to generate photo mosaics on Linux.
1/4
Photo mosaics make thoughtful gifts, and can brighten up plain walls with beautiful images of
vacations, childhood memories, or even pop culture. It's easy to make a photo mosaic from
the Linux command line. Here's how.
Every picture you take will have a dominant color, and photo mosaic generators will use that
dominant color to contribute to a much larger image. The more images you have available,
the finer the detail in the completed photo mosaic will be.
A photo on your wall or as the wallpaper on your desktop is great, but being able to focus in
on a small area and see the individual images which make it up, is even better.
Photo mosaics work well if the images which make it up are thematically linked to the main
image. A photo mosaic of your recent foreign holiday, for example, is fantastic if it's made up
of images from that holiday.
2/4
You will be cloning the Polyfoto GitHub repository, so if you don't have Git on your system,
install it now:
On Debian-based systems:
cd polyfoto
...where input.png is the image you want your photo mosaic to resemble, sources is the
directory that contains the photos which will make up the mosaic, and output.png is the
filename of the image which will be created. The -n argument is the number of image rows
that will make up the final image.
As an example, we've put 100 images in the "hols" folder, and we want to use the image
"my_head.jpg" as the base image, and we're satisfied with the other defaults:
Note that the command must be run from within the Polyfoto directory, so make sure to either
move your photos folder to within that directory or use absolute paths within the command.
The process isn't quick, and the photo below took around a minute to produce on a 16GB i5
machine with a GTX 1050 card. Polyfoto doesn't specify how much memory you need, but
it's always worth checking how much RAM you have.
3/4
It doesn't look like anything much. Increasing the number of rows to 128 yielded better
results, although creation time increased to almost 25 minutes. The reasons for this are
unclear, as the CPU and RAM remained relatively untaxed.
Needless to say, creating a photo mosaic works better with simple images than with complex
ones with a lot going on. More complex mosaics require more individual images to act as
"pixels" to make them clear. Choose carefully, and you'll get good results.
Going beyond the basics, Polyfoto offers a number of optional arguments, allowing you to,
among other things, set the proportional center of construction, choose a rescaling factor,
and specify a pixel height of thumbnails. For the full documentation, visit the project's GitHub
page.
Photo Mosaics Make Great Gifts for Your Relatives and Friends
It's always hard to choose a gift to give to your nearest and dearest, but you can't go far
wrong with a present based on shared memories and experiences.
While photo mosaics may be great to give your parents, siblings, children, or close friends,
for people who you're not especially close to, or who you know won't appreciate such a
personal item, use a gift guide or recommendation engine instead.
4/4