A simple program I made while getting started with Rust. It converts images to ASCII art 😁
I convert images to grayscale because I don't need color (yet). Then I quantize the pixel values based on how many ASCII characters I want to use, assigning the brighter values with bigger characters and darker values with smaller characters. And that's it. I made it to get used to Rust because I'm a noob.
cargo build --release
The executable will be in <project-dir>/target/release
I've attached the exe to run it on windows without installing anything but for other systems, you'd need to compile it.
$<path to executable> <w> <h> image_path1 image_path2...
Where, w: ASCII image width (u32) h: ASCII image height (u32) And space-separated image paths
Example:
ascii-art.exe 120 60 /src/image1.jpg /test/image2.jpg
Replace ascii-art.exe with your executable name
Original:
ASCII form: