#ascii-art #image #crossterm #console #color #converting

ascii-izer

A library for converting an image into ASCII art

6 releases

0.3.1 Feb 2, 2025
0.3.0 Feb 2, 2025
0.2.1 Feb 2, 2025
0.1.1 Feb 1, 2025

#636 in Text processing

Download history 480/week @ 2025-02-01

480 downloads per month

Apache-2.0

13KB
272 lines

ascii-izer

An image to ASCII art library for rust

Features

  • Color [default]: Processes the image color alongside the pixels during ASCII generation.
  • Crossterm: Provides a simple method to put the ASCII into the console via crossterm. This does not output color

Usage

Simple

The functions to_ascii_lines and image_into_lines are the simplest way to convert an image into ASCII. Keep in mind, however, the dimensions taken by these functions are the exact level that the input image will be resized to, aspect ration is not respected.

Advanced

The ASCIIGenerator struct can be used to have more control over the exact parameters used.


lib.rs:

An image to ASCII art library for rust

Features

  • Color [default]: Processes the image color alongside the pixels during ASCII generation.
  • Crossterm: Provides a simple method to put the ASCII into the console via crossterm. This does not output color

Usage

Simple

The functions [to_ascii_lines] and [image_into_lines] are the simplest way to convert an image into ASCII. Keep in mind, however, the dimensions taken by these functions are the exact level that the input image will be resized to, aspect ration is not respected.

Advanced

The [ASCIIGenerator] struct can be used to have more control over the exact parameters used.

Dependencies

~2–11MB
~137K SLoC