Asciify is a Rust project that converts images into ASCII art. This tool allows you to specify various parameters such as the output width, filter type, transparency threshold, and whether the output should be in black and white.
To install and run Asciify, ensure you have Rust installed. Then, clone the repository and build the project using Cargo:
cd asciify
cargo build --release
You can run the Asciify tool from the command line. Here are some examples of how to use it:
cargo run --release -- --path /path/to/image.png --width 100 --filter CatmullRom --transparency-threshold 25 --black-and-white
--path, -p
(String): The path to the input image file.--width, -w
(u32): The width of the output ASCII art. Default is 100.--filter, -f
(Filter): The filter type for image scaling. Options areNearest
,Linear
,Cubic
,CatmullRom
. Default isCatmullRom
.--transparency-threshold, -t
(u8): The transparency threshold for the input image. Range is 0-255. Default is 25.--black-and-white, -b
(bool): Whether the output should be in black and white. Default is false.
There're a few images for you to use as an example at: examples/
███████████████████████░░░▒▒▓████████████████████████████████▓▒░░░▓█████████████████████████████████
██████████████████████▒ ░▒▓████████████████████████▓░ █████████████████████████████████
██████████████████████ ▒▒░░ ░░░ ▓████████████████████████████████
██████████████████████ ▒████████████████████████████████
██████████████████████ ▓████████████████████████████████
██████████████████████▒ ▓████████████████████████████████
█████████████████████▓ ▒███████████████████████████████
████████████████████▒ ░██████████████████████████████
███████████████████▓ ░█████████████████████████████
███████████████████ ▓████████████████████████████
██████████████████▓ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░████████████████████████████
██████████████████▒ ░▓█████████████████████████████████▓░ ░████████████████████████████
██████████████████▒ ▓█████████████████████████████████████▒ ░████████████████████████████
██████████████████▓ ▒███████▓▓▓███████████████████▓▒▓███████░ ░████████████████████████████
███████████████████ ▓██████▒░▒▒▒█████████████████▓░▒▒▒██████▒ ▒████████████████████████████
███████████████████░ ▓██████▒▒▒░▒█████████████████▒░▒░░██████▒ ▓████████████████████████████
███████████████████▓ ▒██████▓▒▒▓███████████████████▓▒▒▓██████░ ░█████████████████████████████
████████████████████▓ ▓█████████████████▓▒▓█████████████████▒ ░██████████████████████████████
██████████████████████▒ ▒██████████████▓▓▓▓▓▓██████████████▓▒ ░███████████████████████████████
████████████████████████▒ ▒▓▓███████████▓▓▓▓▓███████████▓▒░ ░▓████████████████████████████████
██████████████████████████▓▒░ ░░▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒░░ ░▒███████████████████████████████████
█████████████████░▒▒▒▓████████▓▓▒░░ ░░▒▒▓███████████████████████████████████████
██████████████████▒ ░▒▓█████████████░ ░▓█████████████████████████████████████████████
████████████████████▒ ░▒██████████▓ ▓████████████████████████████████████████████
█████████████████████▓ ░░▒▓██████▓ ░ ████████████████████████████████████████████
██████████████████████▓ ░ ░░░▒ ░ ▒░ █ ░▒ ▓███████████████████████████████████████████
████████████████████████░ █▒ █░ ░█ ▓███████████████████████████████████████████
██████████████████████████▓▒▒░░░░▒▒ █▒ █░ ░█ ▓███████████████████████████████████████████
███████████████████████████████████ █▒ █░ ░█ ▓███████████████████████████████████████████
███████████████████████████████████ █▒ █░ ░█ ▓███████████████████████████████████████████
███████████████████████████████████ █▒ █░ ░█ ▓███████████████████████████████████████████
██████████████████████████████████▓ ▓░ █░ ░█ ▒███████████████████████████████████████████
████████████████████████████████▓▒ ▒█░ ░█▒ █▒ ▒▓█████████████████████████████████████████
███████████████████████████████▓░ ░▒▓█░ ░▓██░ ░▓▓▒░░ ▓████████████████████████████████████████
████████████████████████████████▓▓▓▓██▒ ░▒▓█████▓▒░ ▒██▓▓▓▓█████████████████████████████████████████
██████████████████████████████████▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓███████████████████████████████████████████
███████████████████████████████████▓▓▓▓█▓▓▓▓███▓▓▓▓█▓▓▓▓████████████████████████████████████████████
███████████████████████████████████▓▓▓▓█▓▓▓▓▓█▓▓▓▓▓█▓▓▓▓████████████████████████████████████████████
███████████████████████████████████▓▓▓▓█▓▓▓▓▓█▓▓▓▓▓█▓▓▓▓████████████████████████████████████████████
████████████████████████████████████████████████████████████████████████████████████████████████████
Contributions are welcome! Please feel free to submit a Pull Request or an Issue.
This project is licensed under the MIT License.