A tool to generate a mosaic image.
python3 mosaic.py --target target.png --collection collection --tile-size 5
The resulting mosaic image will be called mosaic.png
This tool is a POC and therefore some assumptions apply:
- The collection images are squared
- The collection images are all of the same size
- The target image dimensions are a multiple of the collection image dimensions
Further, the implementation does not focus on performance.
convert input.png -resize 2500x1550! output.png
With the exclamation mark the ratio of the image is ignored.
For development purposes a collection of unicolor images with size 5x5 pixels can be generated with:
python3 generate.py
They will be saved in a directory called collection