Crates.io | montage |
lib.rs | montage |
version | 0.1.0 |
source | src |
created_at | 2022-03-20 09:18:52.662288 |
updated_at | 2022-03-20 09:18:52.662288 |
description | create montage artwork from emojis |
homepage | |
repository | |
max_upload_size | |
id | 553483 |
size | 1,662,305 |
This currently only operates on mapping individual pixels, I am working on writing this such that it maps multiple pixels to a single palette item, which is a work in progress.
Let's say you have a collection of images, and you want to put them together in a way that resembles any image you'd like. What this program does, is take as input, a folder of images (out palette), and an input image (what we are trying to recreate).
This basically goes through every item (image) in the palette and finds the average color for each item in the palette. After this process, we can then go through every pixel in our image, and figure out which item from our palette msot resembles our pixel. Using this information, we can construct the mosaic by taking the pixels from items in our palette and writing them to a new image.
This can work with any set of images, it doesn't have to be emojis.
cargo build --release
./mosaic
./mosaic --help
command line args:
./mosaic -f Landscape-Color.png -p emoji -fs 256 -ps 16 -v 64.0
Pass in the extension for the file name!
1 Find a collection of images
2 Put the images into a named folder
3 Put named folder under palettes/