[![Crate Status](https://img.shields.io/crates/v/rascii_art.svg)](https://crates.io/crates/rascii_art) [![Docs Status](https://docs.rs/rascii_art/badge.svg)](https://docs.rs/crate/rascii_art/)

RASCII Logo

``` Advanced ASCII Art Generator

Usage: rascii [OPTIONS]

Arguments: Path to the image

Options: -w, --width Width of the output image. Defaults to 128 if width and height are not specified -H, --height Height of the output image, if not specified, it will be calculated to keep the aspect ratio -c, --color Whether to use colors in the output image -i, --invert Inverts the weights of the characters. Useful for white backgrounds -C, --charset Characters used to render the image, from transparent to opaque. Built-in charsets: block, emoji, default, russian, slight [default: default] -h, --help Print help -V, --version Print version ```

Features

Installing The CLI

Via Cargo

Note: This is the recommended way of installing the RASCII CLI.

Warning: You must have ~/.cargo/bin/ in your PATH to run rascii directly.

sh cargo install rascii_art

Manually

Warning: this installation method is discouraged and only works for GNU/Linux or any other POSIX compatible systems!

sh git clone https://github.com/KoBruhh/RASCII && cd RASCII chmod +x install.sh ./install.sh

Using The Crate

Instead of using the unreliable system shell to call RASCII, you can add the rascii_art crate to your project and use it in Rust!

To do so, run cargo add rascii_art to add RASCII to your Cargo project.

Here is a code example:

```rs use rasciiart::{ renderto, RenderOptions, };

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

render_to(
    "ferris.png",
    &mut implements_io_write,
    RenderOptions::new()
        .width(100)
        .colored(true)
        .charset(&[".", ",", "-", "*", "£", "$", "#"]),
)
.unwrap();

println!("{implements_io_write}");

} ```

Showcase

Japanese Charset

RASCII output of chad with the Japanese charset

Emoji Charset

Note: The emoji charset does not guarantee your outputs color will match the color of your image, this is just a coincidence that happened with Ferris.

RASCII output of ferris with the emoji charset

Chinese Charset

RASCII output with the Chinese charset

Block Charset

RASCII output of TrollPepe with the block charset

RASCII output of Ferris with the block charset

Custom ASCII Charset

You can use the --charset (or -C) CLI option to provide a custom charset to use when generating some ASCII art.

The value of this must option must go from transparent to opaque, like so:

sh rascii --charset " ░▒▓█" --color ferris.png

Note that a charset similar to the above charset is available as a builtin named block.

RASCII output of Ferris with a custom charset

Amogus

Amogus

Contributors

KoBruhh RGBCube felixonmars fnordpig

Star History

Star History Chart