This project is a simple CLI tool written in pure Rust that converts images into ASCII art. Customize output width and save your result to a file or view it in the terminal.
- image crate – For loading and processing image data
- clap crate – For command-line argument parsing
- Pure Rust – No FFI or C dependencies
- Rust toolchain (>=1.60.0)
- Cargo package manager
git clone https://github.com/lowpolycat1/image-ascii-rs
cd image-ascii-rs
cargo build --release
cargo run -- --input <input_path> --output <output_path> --width <width>
Flag | Description | Required |
---|---|---|
--input |
Path to the input image file | ✅ |
--output |
Path to the output .txt file |
✅ |
--width |
Width of the resulting ASCII output | ✅ |
cargo run -- --input assets/cat.png --output out/cat.txt --width 100
This will convert the image cat.png
into ASCII art 100 characters wide and save it to out/cat.txt
.
MIT License – see LICENSE.txt for details.