Skip to content

Fluzko/asciify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asciify

Asciify is a Rust project that converts images into ASCII art. This tool allows you to specify various parameters such as the output width, filter type, transparency threshold, and whether the output should be in black and white.

Table of Contents

Installation

To install and run Asciify, ensure you have Rust installed. Then, clone the repository and build the project using Cargo:

cd asciify
cargo build --release

Usage

You can run the Asciify tool from the command line. Here are some examples of how to use it:

cargo run --release -- --path /path/to/image.png --width 100 --filter CatmullRom --transparency-threshold 25 --black-and-white

Arguments

  • --path, -p (String): The path to the input image file.
  • --width, -w (u32): The width of the output ASCII art. Default is 100.
  • --filter, -f (Filter): The filter type for image scaling. Options are Nearest, Linear, Cubic, CatmullRom. Default is CatmullRom.
  • --transparency-threshold, -t (u8): The transparency threshold for the input image. Range is 0-255. Default is 25.
  • --black-and-white, -b (bool): Whether the output should be in black and white. Default is false.

Examples

There're a few images for you to use as an example at: examples/

███████████████████████░░░▒▒▓████████████████████████████████▓▒░░░▓█████████████████████████████████
██████████████████████▒       ░▒▓████████████████████████▓░        █████████████████████████████████
██████████████████████            ▒▒░░               ░░░           ▓████████████████████████████████
██████████████████████                                             ▒████████████████████████████████
██████████████████████                                             ▓████████████████████████████████
██████████████████████▒                                            ▓████████████████████████████████
█████████████████████▓                                              ▒███████████████████████████████
████████████████████▒                                                ░██████████████████████████████
███████████████████▓                                                  ░█████████████████████████████
███████████████████                                                    ▓████████████████████████████
██████████████████▓           ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░          ░████████████████████████████
██████████████████▒        ░▓█████████████████████████████████▓░       ░████████████████████████████
██████████████████▒       ▓█████████████████████████████████████▒      ░████████████████████████████
██████████████████▓      ▒███████▓▓▓███████████████████▓▒▓███████░     ░████████████████████████████
███████████████████      ▓██████▒░▒▒▒█████████████████▓░▒▒▒██████▒     ▒████████████████████████████
███████████████████░     ▓██████▒▒▒░▒█████████████████▒░▒░░██████▒     ▓████████████████████████████
███████████████████▓     ▒██████▓▒▒▓███████████████████▓▒▒▓██████░    ░█████████████████████████████
████████████████████▓     ▓█████████████████▓▒▓█████████████████▒    ░██████████████████████████████
██████████████████████▒    ▒██████████████▓▓▓▓▓▓██████████████▓▒    ░███████████████████████████████
████████████████████████▒    ▒▓▓███████████▓▓▓▓▓███████████▓▒░    ░▓████████████████████████████████
██████████████████████████▓▒░    ░░▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒░░     ░▒███████████████████████████████████
█████████████████░▒▒▒▓████████▓▓▒░░                     ░░▒▒▓███████████████████████████████████████
██████████████████▒  ░▒▓█████████████░               ░▓█████████████████████████████████████████████
████████████████████▒  ░▒██████████▓                   ▓████████████████████████████████████████████
█████████████████████▓  ░░▒▓██████▓          ░          ████████████████████████████████████████████
██████████████████████▓   ░ ░░░▒ ░     ▒░    █    ░▒    ▓███████████████████████████████████████████
████████████████████████░              █▒    █░   ░█    ▓███████████████████████████████████████████
██████████████████████████▓▒▒░░░░▒▒    █▒    █░   ░█    ▓███████████████████████████████████████████
███████████████████████████████████    █▒    █░   ░█    ▓███████████████████████████████████████████
███████████████████████████████████    █▒    █░   ░█    ▓███████████████████████████████████████████
███████████████████████████████████    █▒    █░   ░█    ▓███████████████████████████████████████████
██████████████████████████████████▓    ▓░    █░   ░█    ▒███████████████████████████████████████████
████████████████████████████████▓▒    ▒█░   ░█▒    █▒    ▒▓█████████████████████████████████████████
███████████████████████████████▓░  ░▒▓█░   ░▓██░   ░▓▓▒░░  ▓████████████████████████████████████████
████████████████████████████████▓▓▓▓██▒ ░▒▓█████▓▒░ ▒██▓▓▓▓█████████████████████████████████████████
██████████████████████████████████▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓███████████████████████████████████████████
███████████████████████████████████▓▓▓▓█▓▓▓▓███▓▓▓▓█▓▓▓▓████████████████████████████████████████████
███████████████████████████████████▓▓▓▓█▓▓▓▓▓█▓▓▓▓▓█▓▓▓▓████████████████████████████████████████████
███████████████████████████████████▓▓▓▓█▓▓▓▓▓█▓▓▓▓▓█▓▓▓▓████████████████████████████████████████████
████████████████████████████████████████████████████████████████████████████████████████████████████

Contributing

Contributions are welcome! Please feel free to submit a Pull Request or an Issue.

License

This project is licensed under the MIT License.

About

Rust CLI tool that converts images to Ascii

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages