#ascii #images

asciify

A rust library for converting images to a readable format on the command line

7 releases

0.1.6 Sep 19, 2020
0.1.5 Sep 8, 2020
0.1.4 Aug 26, 2020

#1277 in Text processing

Download history 8/week @ 2023-10-20 21/week @ 2023-10-27 10/week @ 2023-11-03 8/week @ 2023-11-10 17/week @ 2023-11-17 25/week @ 2023-11-24 26/week @ 2023-12-01 8/week @ 2023-12-08 16/week @ 2023-12-15 20/week @ 2023-12-22 4/week @ 2023-12-29 16/week @ 2024-01-05 11/week @ 2024-01-12 16/week @ 2024-01-19 37/week @ 2024-01-26 4/week @ 2024-02-02

70 downloads per month

Custom license

21KB
173 lines

github crates.io docs.rs

Asciify

A rust library for converting images to a readable format on the command line

To use the code, simply construct a builder and set the properties desired. You can then choose to print the text straight to the console, or convert it to a string for later use:

// Printing to console with color
AsciiBuilder::new_from_path(opt.input)
    .set_deep(false);
    .set_invert(false);
    .to_std_out(true);

Ascii chocobo

// Generating a string and resizing
AsciiBuilder::new_from_path(opt.input)
    .set_deep(true);
    .set_resize(Some(32, 32));
    .build();

Ascii chocobo after resizing

$ ./asciify ./test-images/SPECIAL(ChocoboA)900.png -c

Ascii chocobo with color

Dependencies

~16MB
~111K SLoC