First written April 28, 2003. I expect much of this information to be outdated.


Photomosaics

A mosaic is an arrangement of images that are used to form a larger image. A photomosaic is an image that is comprised of several smaller photographs, usually assembled through a computer algorithm. Computers have no artistic capabilities, so it is the responsiblity of programmers to teach these ideas to a computer. By no means do I concider myself an artist, but my rudimentary knowledge of the color wheel certainly helped. Think of it as a 2500-piece jigsaw puzzle with some repeating pieces and some missing pieces and some that don't quite fit at all.

Example Images


The Mona Lisa (Before)

Mr. Da Vinci did a good job with this painting, n'est pas? Leo used alot of brown, dark green, and natural hues (very hard to find in 16-color icons).

The Mona Lisa (After)


And my version has a good likeness to the original, but it lacks a lot of the quality. This has been scaled for webviewing. Download the original. The software took about 10 minutes to produce a 1280 by 1984 pixel graphic using 2,480 (often repeating) icons.

Stary Night (Before)

This is my personal favorite Van Gogh painting.

Stary Night (After)

My rendition does it justice. Download a slightly larger version of the original. (The original is a 5 meg graphic.)

Tools Needed

The graphics are assembled using only software that I found for free off the Internet plus a small dose of my own code. My computer is a 1 Ghz Intel Celeron running Windows ME, but any version of Windows 95 or higher should be adequate. You don't need the expensive Adobe Photoshop to do anything that I've done here. You do need patience and ingenuity.
And these links:

My Code

(Warning: The Image Magick library used in these scripts have changed over the last few years. I'm pretty sure they won't work the same anymore.)

Perl Photomosaic GeneratorTakes a large image and a text database of icons and builds a mosaic to resemble the larger image.
Perl Image CatalogerThis creates a text database to be used by the Photomosaic generator

The Free Software

PerlDownloadPerl is used for all the number crunching necessary to make the graphic come to life. Besides graphics work, Perl makes my life easier for a wide range of computer task. I recommend Version 5.6.1.
Image MagickDownloadImage Magick is used within my Perl scritps to break apart images and analyze pixels. It also comes with the DOS program "montage" which is used to ssemble the final graphic once a layout of images is chosen.
IrfanViewDownload Irfanview is a fast, lightweight program for viewing images. It also has an unlimited batch file converter/renamer utility. I used it to convert 3,000+ icons to gif files in a matter of seconds.
Axialis Icon WorkshopDownload(Free for only 30 days) IconWorkshop is a very easy to use icon maker. But where the program really shines is it's easy to use ICL file (Icon Library) exporter. I exported about 60 ICL files, containing about 2,500 icons total, in a very short, productive time.
RAM IdleDownloadRAM Idle has nothing to do with graphics, but it helps alot when you are working with them. The program "montage" (found in the Image Magick package) is a real RAM hog, and RAM Idle kept my computer from crashing during the mosaic's creation.

This is just the first of many creations I have planned using Photomosaics. The hardest part of building these images is finding enough graphics with the same size and a variety of colors necessary for composing complex images such as the Mona Lisa.

Text Mosaics

Text mosaics are similar to photomosaics, but the puzzlepieces used to generate the mosaic are all alphanumerical characters (a, b, c, 1, 2, 3). To generate a text mosaic, I use Perl and Image Magick. Using this code, you can combine any image with any text.

Source code: Perl Image To Text Converter

Examples:

Mona LisaUsing the text of some disertation I found on "Alice in Wonderland".
American FlagUsing the text of the Declaration of Independence.
DilbertUsed to show off the how my program treats whitespace in images.


Page Information

  • 2 years ago [history]
  • View page source
  • You're not logged in
  • Tags: perl graphics code

Wiki Information

Recent PBwiki Blog Posts