█ For prettier examples, by the author, view HERE and HERE. ▐▌
█ ▐▌
█ INSTALL: ▐▌
█ Either compile yourself, the README is very informative, or install via ▐▌
█ package manager normal method: ▐▌
█ su aptitude install metapixel exit ▐▌
█ man metapixel ▐▌
█ metapixel --help ▐▌
█ HERE is the README from the tar.gz if you installed via package manager. ▐▌
█ ▐▌
█ IMAGE TO TURN INTO A MOSIAC: ▐▌
█ The images I used to create the mosaics above: ▐▌
█ cd images ▐▌
█ wget http://mewbies.com/geek_fun_files/metapixel/mewbies_in_color.png ▐▌
█ wget http://mewbies.com/geek_fun_files/metapixel/mewbie_xl.png ▐▌
█ ▐▌
█ IMAGES TO USE AS TILES: ▐▌
█ First we need a rather large collection of images to use as the 'tiles' ▐▌
█ (the images that act as the mosaic in your image). The more images you ▐▌
█ have to work with the better, at least a *few thousand; depending on the ▐▌
█ image you are turning into a mosaic. This is the part that takes the ▐▌
█ longest, once done it's a breeze. ▐▌
█ ▐▌
█ *I've put together two collections of reduced images; one of miscellaneous ▐▌
█ icons, clipart etc. (21MB) and the other I created images from various ▐▌
█ ANSI art packs as a homage to the artists (52MB). If you would like to use ▐▌
█ either or both to get you started: ▐▌
█ cd images ▐▌
█ wget http://mewbies.com/geek_fun_files/metapixel/Tiles.64x64.for.Mosaics.Misc-MWB/mwbtmmc1.zip
█ unzip mwbtmmc1.zip ▐▌
█ wget http://mewbies.com/geek_fun_files/metapixel/Tiles.64x41.for.Mosaics.ANSI.Art-MWB/mwbtmaa1.zip
█ unzip mwbtmaa1.zip ▐▌
█ y (yes to overwrite README etc.) ▐▌
█ ▐▌
█ FEW TIPS: ▐▌
█ - Metapixel reads only GIF, JPG and PNG. If you have other formats; use ▐▌
█ ImageMagick to easily convert. ▐▌
█ - It's best to use images for the tiles that are the same size. If not ▐▌
█ they will be stretched to fit the size of tile; doesn't look nice up ▐▌
█ close. Again you can use ImageMagick to batch reduce, crop or chop up ▐▌
█ images to be the same size. ▐▌
█ - You might find many images here to test with (I do not have any): ▐▌
█ ls -LR /usr/share/icons/ ▐▌
█ - I've found results are better if you use actual real life images and not ▐▌
█ drawn art as I have used for my demonstrations here. ▐▌
█ ▐▌
█ CREATE THE TILE LIBRARY: ▐▌
█ 1. Create a directory for MetaPixel to output the tiles it creates into. ▐▌
█ I'll name mine based on the size I'm going to reduce the images to: ▐▌
█ mkdir tile_library_32x32 && mkdir tile_library_32x21 ▐▌
█ 2. Create the tile library - this will scale the images (-r recursively) ▐▌
█ to the sizes stated (128x128 is the default and it also creates a color ▐▌
█ tables, tables.mxt, it will use): ▐▌
█ metapixel-prepare -r Misc-64x64 tile_library_32x32 --width=32 --height=32 ▐▌
█ 'Misc-64x64' is the source, 'tile_library_32x32' is the tile destination ▐▌
█ You don't need both, but if did download it: ▐▌
█ metapixel-prepare -r ArtPack-64x41 tile_library_32x21 --width=32 \ ▐▌
█ --height=21 ▐▌
█ Done. We can now easily create photo mosaics. ▐▌
█ ▐▌
█ CREATE THE PHOTO MOSIAC: ▐▌
█ Examples, Basic: ▐▌
█ metapixel --metapixel --library tile_library_32x32 input.jpg output.jpg ▐▌
█ This would result in the image being created with rather large tiles; ▐▌
█ 32x32, so if your image isn't very large it won't be nice. ▐▌
█ Results, click to view actual size: ▐▌
█ ▐▌
█ ▐▌
█ To resize the tiles add the switches for height and width, and to not ▐▌
█ repeat a tile for example '50' tiles away from the same tile (takes ▐▌
█ longer, default is 5) add the distance switch: ▐▌
█ metapixel --metapixel --library tile_library_32x32 mewbie_xl.png \ ▐▌
█ output2.png --width=12 --height=12 --distance=50 ▐▌
█ Results, click to view actual size: ▐▌
█ ▐▌
█ ▐▌
█ Resize the resulting output image, for example 3 times larger add the ▐▌
█ switch scale: ▐▌
█ metapixel --metapixel --library tile_library_32x32 mewbie_xl.png \ ▐▌
█ output3.png --width=20 --height=20 --scale=3 ▐▌
█ Results, click to view actual size (2MB): ▐▌
█ ▐▌
█ ▐▌
█ MORE RESULTS: ▐▌
█ Using the ArtPack library: ▐▌
█ metapixel --metapixel --library tile_library_32x21 mewbie_xl.png \ ▐▌
█ outputa1.png --width=20 --height=13 --distance=200 ▐▌
█ Results, click to view actual size: ▐▌
█ ▐▌
█ ▐▌
█ metapixel --metapixel --library tile_library_32x21 mewbie_xl.png \ ▐▌
█ outputa2.png --width=32 --height=21 --scale=3 --distance=100 ▐▌
█ Results, click to view actual size (4.5MB): ▐▌
█ ▐▌
█ ▐▌
█ Using the Misc library: ▐▌
█ metapixel --metapixel --library tile_library_32x32 mewbies_in_color.png \ ▐▌
█ outputm1.png --width=12 --height=12 ▐▌
█ Results, click to view actual size: ▐▌
█ ▐▌
█ ▐▌
█ metapixel --metapixel --library tile_library_32x32 mewbies_in_color.png \ ▐▌
█ outputm2.png --width=20 --height=20 --scale=3 ▐▌
█ Results, click to view actual size (4.5MB): ▐▌
█ ▐▌
█ ▐▌
█ ▐▌
█ Using the ArtPack library: ▐▌
█ metapixel --metapixel --library tile_library_32x21 mewbies_in_color.png \ ▐▌
█ outputma1.png --width=16 --height=10 --distance=500 ▐▌
█ Results, click to view actual size: ▐▌
█ ▐▌
█ ▐▌
█ metapixel --metapixel --library tile_library_32x21 mewbies_in_color.png \ ▐▌
█ outputma2.png --width=32 --height=21 --scale=3 ▐▌
█ Results, click to view actual size (1MB): ▐▌
█ ▐▌
█ ▐▌
█ Using both libraries: ▐▌
█ metapixel --metapixel --library tile_library_32x21 --library \ ▐▌
█ tile_library_32x32 mewbies_xl2.png outputboth1.png --width=20 \ ▐▌
█ --height=13 --distance=200 ▐▌
█ Results, click to view actual size: ▐▌
█ ▐▌
█ ▐▌
█ An antimosaic is when only one image is used to create the resulting ▐▌
█ mosaic. ▐▌
█ README states: ▐▌
█ metapixel --library images -x input.jpg -f 2 --metapixel input.jpg \ ▐▌
█ output.png ▐▌
█ But I believe that '--library images' is a typo (?) as you can't use ▐▌
█ --library and --antimosaic (-x) together. ▐▌
█ The '-x input.jpg' is the image that will be used as the tiles. ▐▌
█ The second 'input.jpg' is the image that will be built into the ▐▌
█ antimosaic. ▐▌
█ For example I'll use ANSI artwork 'm0jana.png' to create the mosaic: ▐▌
█ metapixel --antimosaic m0jana.png -f 40 --metapixel mewbies_in_color.png \ ▐▌
█ outputanti1.png --width=9 --height=9 ▐▌
█ Results, click to view actual size: ▐▌
█ ▐▌
█ ▐▌
█ NOTES / TIPS: ▐▌
█ 1. To output to a different image format, for example PNG just change ▐▌
█ the output extension to .png: output.png ▐▌
█ 2. I found that if I used the '--scale' switch with a library that the ▐▌
█ tiles weren't the same width and height that the tiles would be resized ▐▌
█ also to be almost similar width x height. Therefore when using a tile ▐▌
█ that isn't same width as height declare the --width and --height. ▐▌
█ 3. Using --distance ▐▌
█ - It doesn't guarantee there won't be repeats within the range set, if ▐▌
█ there isn't enough tiles in the color required. ▐▌
█ - The higher the distance, the longer it will take. ▐▌
█ - If distance is set higher than Metapixel can find an image for, it ▐▌
█ can error out saying it couldn't find a matching image only after ▐▌
█ running for a very long period or just stop without any error. So I ▐▌
█ would recommend if using --distance to start low, i.e. 50, and compare ▐▌
█ the results with none or higher. ▐▌
█ - If not setting distance high enough the results can be very distinct; ▐▌
█ the new repeat will be lines across the image; the blending randomness ▐▌
█ isn't done as well. HERE is an example of what I mean. ▐▌
█ 4. The smaller the width and height are of the tiles the size of the ▐▌
█ resulting file increases. ▐▌
█ 5. To do in a collage style (tiles will overlap each other a bit) add the ▐▌
█ switch: --collage ▐▌
█ 6. You can state the '--library' option more than once to build the mosaic ▐▌
█ from different locations. ▐▌
█ 7. You can adjust the colors of the tiles; view README. ▐▌
█ 8. BTW I created the sizes in the ArtPack library by 'chopping' each ANSI ▐▌
█ art image I had into multiple images using ImageMagick's 'convert' in ▐▌
█ batch mode. For example many of the images I had were 640 width x well ▐▌
█ over 3,000 in height. So I chopped anything over 416 in height into ▐▌
█ multiple images: ▐▌
█ convert To.Chop/*.png -crop 640x416 Output/apb-%02d.png ▐▌
█ If you receive the error "convert: Memory allocation failed `Not ▐▌
█ enough space' @ fatal/image.c/Acquire ImageInfo/336." ▐▌
█ Then reduce the quantity of images in the directory to chop at one ▐▌
█ time. I could do about 300+ at one go in Windows XP. ▐▌
█ From there I sorted by size, deleted the scraps that weren't height of ▐▌
█ 416, and then batch reduced all to 64x41. ▐▌
█ ▐▌
█ ERROR NOTES: ▐▌
█ 1. During the preparing of the library if a transparent image has ▐▌
█ interlace issues MetaPixel will skip the image with the error ▐▌
█ "Assertion `data->info_ptr->interlace_type == 0' failed.". ▐▌
█ 2. Images must be at least 24 colors or more or Metapixel will skip the ▐▌
█ image with the error "Assertion `data->info_ptr->color_type == (2) || ▐▌
█ data->info_ptr->color_type == (2 | 4)' failed." or "Assertion ▐▌
█ `data->info_ptr->bit_depth == 8 || data->info_ptr->bit_depth == 16' ▐▌
█ failed.". So any images that I had that were less (such as black and ▐▌
█ white) I converted the images to grayscale or RGB colors (24). ▐▌
█ ▐▌
█ MORE MOSAICS: ▐▌
█ ````````````` ▐▌
█ Just a brief list of my favorite other mosaic image creating softs using ▐▌
█ the same image to compare the flavor. Click on all images shown below for ▐▌
█ the actual size and to view the details. ▐▌
█ ▐▌
█ - PicToBrick is a fabulous free, portable, open source, very easy to use ▐▌
█ program that generates mosaics in a variety of brick / Lego patterns. It ▐▌
█ comes with set patterns and you can generate your own easily. The output ▐▌
█ also can generate information to actually build the results using Legos ▐▌
█ bricks; view the generated results for the image below HERE. Tutorial ▐▌
█ HERE and this tutorial HERE helped me generate this image in under a ▐▌
█ minute: ▐▌
█ ▐▌
█ ▐▌
█ - Mozaiq.org generates easily very nice mosaic images online; upload ▐▌
█ image, wait a bit, save image. No registration, e-mail phishing or ▐▌
█ watermarks. For example: ▐▌
█ ▐▌
█ ▐▌
█ - At easymoza.com you can upload your own images and or mix with theirs to ▐▌
█ create your mosaic. Note: While it is processing (takes a bit) you need ▐▌
█ to leave that window active or it will stop. So using Firefox I just ▐▌
█ dragged the tab off to a new window so I could continue to browse ▐▌
█ while it was processing. (I used the mewbie image to create the mosaic ▐▌
█ from the mewbie image - same image to create the mosaic): ▐▌
█ ▐▌
█ ▐▌
█ - Mosaically.com is another online tool that you upload your own tile ▐▌
█ images. You can select the size of the tiles and adjust the color. To ▐▌
█ save the generated image; right click on image, select View image, then ▐▌
█ save it. If you select the Save/Make button you need login with your ▐▌
█ Facebook or create an account with them; easy and I used mailiantor.com; ▐▌
█ no confirmation etc rubbish. Then it will generate a better version to ▐▌
█ save and a high quality version (might take up to three times longer). ▐▌
█ This version you can leave on their site to sell and let other users ▐▌
█ edit it or keep it private BUT you must pay to download it (mine was ▐▌
█ priced at $19.99, size of 14880 x 18720). Free version: ▐▌
█ ▐▌
█ ▐▌
█ - Shape Collage program to create a mosiac shape, or use their beautiful ▐▌
█ online tool here, you'll see what I mean once you use it. Free version ▐▌
█ does have a watermark bottom right of image. ▐▌
█ ▐▌
█ ▐▌
█ - Photovisi.com you create your own a collage, unless you are very patient ▐▌
█ to make it a mosaic - You can upload as many images as you like then you ▐▌
█ can rotate, resize, move them, etc. The finished image will have a ▐▌
█ watermark bottom right. ▐▌
█ ▐▌
█ - Frintr.com is a very clever idea - it makes a mosaic from your Facebook ▐▌
█ and Twitter profile pic then uses all of your friends as the tiles. ▐▌
█ ▐▌
█ OTHERS / WARNINGS: ▐▌
█ - Beta.picartia.com you must enter an e-mail address to receive a 5 ▐▌
█ digit code to retrieve the finished image AND it does have a watermark. ▐▌
█ I entered an e-mail, never received the code and had to start from ▐▌
█ scratch to enter a different e-mail...of which I still never received ▐▌
█ any codes four different e-mail servers later. ▐▌
█ ▐▌
█ - Picture2life.com not only do you need to enter an e-mail after doing ▐▌
█ so you'll then be prompted for your cell phone number. ▐▌
█ ▐▌
█ //---------------------------------------------------------------------- ▐▌
█ ▐▌
█ If you find mistakes, have suggestions, and or questions please post at ▐▌
█ mewbies forum HERE - thank you. ▐▌
█ ▐▌
█ Last update on 02 Jul '13 ▐▌
█ ▐▌
█▌ █▌
█▌ - mewbies.com - █▌
█▌ █▌
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██