#ascii-art #convert-images #image #ascii #art #generator #command-line-tool

app ascii-gen

A command line tool to generate ascii art from images

3 stable releases

1.1.0 Nov 20, 2023
1.0.1 Nov 19, 2023

#39 in #ascii-art

MIT license

365KB
327 lines

Rust ASCII Art Converter

This Rust tool converts images into ASCII art. It takes an image file as input, resizes it according to specified width and height parameters, and then converts the image into ASCII characters.

Installation

Use cargo to quickly and easily install ascii-gen:

cargo install ascii-gen

Usage

Run the tool:

ascii-gen --file path/to/your/image.jpg

Optional parameters:

  • --width: Set the width of the output (default: 80)
  • --height: Set the height of the output (default: 80)
  • --gamma: Set the gamma of the ASCII art (default: 1.0)
  • --live: Enable live editing of the ASCII art (default: false)

Examples:

ascii-gen --file path/to/your/image.jpg --width 120 --height 60
ascii-gen --file path/to/your/image.jpg --width 120 --height 60 --live

Examples

Input

Input

Output (Small)

Output

Output (Large)

Output Large

Dependencies

  • clap - Command-line argument parser for Rust.
  • image - Image processing library for Rust.
  • crossterm - Cross-platform terminal manipulation library for Rust.
  • ratatui - TUI (Text-based User Interface) library for Rust.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Special thanks to the Rust community for their support and contributions.

Dependencies

~11–17MB
~189K SLoC