Crate artem

source ·
Expand description

§artem

artem is a program to convert images to ascii art. While it’s primary usages is through the command line, it also provides a rust crate.

§Usage

To use it, load an image using the image crate and pass it to artem. Addiontially the crate::convert function takes an crate::config::Config, which can be used to configure the resulting output. Whilst crate::config::Config implements Default, it is recommended to do the configuration through crate::config::ConfigBuilder instead.

let image = image::open(path).expect("Failed to open image");
let ascii_art = artem::convert(image, &artem::config::ConfigBuilder::new().build());

Re-exports§

Modules§

Statics§

Functions§

  • Takes an image and returns it as an ascii art string.