ascii-image-cli 0.1.1

Convert images into ASCII art using a fast Rust CLI
1
2
3
4
5
6
7
8
9
10
11
use image::RgbImage;
use rusttype::Font;

pub fn load_image(path: &str) -> RgbImage {
    image::open(path).expect("failed to load image").to_rgb8()
}

pub fn load_font() -> Font<'static> {
    let font_data: &[u8] = include_bytes!("../JetBrainsMonoNL-Regular.ttf");
    Font::try_from_bytes(font_data).expect("invalid font")
}