asciify/asciify.rs
1//! An example for turning an image into ASCII
2extern crate asciifyer;
3
4use asciifyer::{convert_to_ascii, Dimension};
5use std::env;
6
7fn main() {
8 let path = env::args().nth(1).expect("Please enter a path to an image");
9
10 let dimensions = Dimension::new(50, 50);
11 let ascii = convert_to_ascii(&path, Some(dimensions));
12
13 println!("{}", ascii);
14}