Article Preview
Buy Now
FEATURE
Creating a Photomosaic
Using Xojo to generate a photo from photos
Issue: 21.5 (September/October 2023)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 22,640
Starting Page Number: 42
Article Number: 21505
Resource File(s):
project-21505.zip Updated: 2023-08-31 19:03:50
Related Link(s): None
Excerpt of article text...
Photomosaics have been around for decades, long before computer art, but are easier than ever to make with software. The other day I had the idea to my make own app in Xojo to generate them. It turned out to be both more difficult and easier than I thought.
What's a Photomosaic?
At its simplest, a photomosaic is a photographic image where each "pixel" in the picture is made of another tiny photo (
https://en.wikipedia.org/wiki/Photographic_mosaic
). Ideally that photo's overall color is similar to the original pixel, so that from a distance one sees the main photo. When you zoom in, however, you can see all the tiny pictures that form it (see Figure 1).This can be tricky to accomplish, however, as most photos have many colors and it's not always clear which is the dominant. If a photo has two main colors—such as a beach picture that's half blue sky and half sand—which color pixel does it recreate, blue or tan?
More sophisticated photomosaics get around this by selecting photos that match multiple pixels in the original. For instance, if the original had a blue pixel on top of a brown one, the beach photo mentioned would be a perfect substitute. Of course, that type of computation is a
lot more complicated, so for this article we'll do it the simple way.A Photo's "Color"
...End of Excerpt. Please purchase the magazine to read the full article.