1 unstable release
new 0.0.1 | Jan 26, 2025 |
---|
#34 in #colored
84 downloads per month
3MB
496 lines
crascii
Overview
crascii
is a Rust-based command-line tool that converts images into ASCII art. It allows for customization of the output dimensions, color, and character sets, and supports saving or printing the ASCII output directly to the console.
Features
- Convert images to ASCII art.
- Adjustable output dimensions (width and height).
- Supports colored ASCII output.
- Customizable character sets for ASCII conversion.
- Save the output to a file or print it directly to the terminal.
Requirements
- Rust (for building and running the tool).
- An image processing library compatible with Rust (e.g.,
image
).
Installation
-
Clone the repository:
git clone <repository-url> cd <repository-folder>
-
Build the project:
cargo build --release
-
Run the executable:
./target/release/crascii
Usage
Run the tool from the terminal with the following options:
crascii [OPTIONS] --image <IMAGE> --output-path <OUTPUT_PATH>
Options
-i, --image <IMAGE>
: Path to the input image file to be converted.-w, --columns <COLUMNS>
: Number of columns (width) for the ASCII output (optional).-H, --lines <LINES>
: Number of lines (height) for the ASCII output (optional).-C, --color
: Enable colored ASCII output (optional).-c, --charsets <CHARSETS>
: Character set to use for ASCII conversion (default: "default").-o, --output-path <OUTPUT_PATH>
: Path to save the ASCII output file.-p, --print
: Print the ASCII art directly to the terminal (optional).-h, --help
: Show the help message.
Example Commands
-
Convert an image to ASCII and save it:
crascii -i my_image.png -o output.txt
-
Specify custom dimensions for the output:
crascii -i my_image.png -w 100 -H 50 -o output.txt
Development
- Install Rust: Rust installation guide.
- Install dependencies:
cargo build
- Run the tool:
cargo run -- [OPTIONS]
Contributing
Contributions are welcome! Feel free to submit issues or pull requests to enhance the tool.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
- Rust community for support and documentation.
Dependencies
~10–17MB
~244K SLoC