A simplistic cli tool that transforms your pictures into lego brick pictures made with rust using the image lib.
-
computes the average color of the brick by passing through each pixels of the brick;
-
multiplies by the brick pixel (allows to tend to black when the brick pixel tends to black otherwise it keeps the average color).
-
saves the image to path/to/file.lego for optimization
-
optimizes the lego file and saves to path/to/file.lego.png using oxipng
the brick.jpg need to be in the same directory as the executable
ToLego.exe -f path/to/picture-> default bricksize (50px / 50px)ToLego.exe -f path/to/picture -b 100-> bricksize of 100px / 100px
cargo install
cargo build --target-dir dist
cargo run -- -f path/to/file -b 25

