Skip to main content

Crate rascii_art_img

Crate rascii_art_img 

Source
Expand description

§Usage:

use rascii_art_img::{
    render_to,
    RenderOptions,
};

fn main() {
    let mut buf = String::new();

    render_to(
        r"/path/to/image.png",
        &mut buf,
        &RenderOptions::new()
            .width(100)
            .colored(true)
            .charset(&[".", ",", "-", "*", "£", "$", "#"]),
    )
    .unwrap();
}

Modules§

charsets

Structs§

RenderOptions

Functions§

convert_string_to_str_vec
Converts a string into a vector of strings, with a character each for every string. This is a workaround to deal with the weirdness of UTF-8, since we cannot index into a string and just grab a character (we could get some garbage byte that doesn’t map to a character).
render
render_image
render_image_to
render_to