Skip to content

ChargedMonk/ASCII-ART

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII-ART

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.

How to compile:

cargo build --release

The executable will be in <project-dir>/target/release

How to run?

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

Runs:

Original:

tom

ASCII form:

image

About

A very basic image to ascii art converter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages