| Crates.io | ascim |
| lib.rs | ascim |
| version | 1.0.0 |
| created_at | 2025-10-18 14:04:36.278884+00 |
| updated_at | 2025-10-18 14:04:36.278884+00 |
| description | Convert images to ASCII art (CLI + library). |
| homepage | |
| repository | https://github.com/subham008/ascim |
| max_upload_size | |
| id | 1889241 |
| size | 1,190,025 |
A small Rust command-line tool and library for converting images to ASCII art. Useful for quick previews, terminal wallpapers, demos, or embedding simple text-based representations of images.
cargo install ascim
Basic CLI usage:
# print image.png to ASCII on stdout
ascim image.png
As Library
use ascim::{AsciImage, Arguments};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Arguments {
file_path: String::from("examples/image.png"),
max_width: 80,
max_height: 40,
character_ratio: 2.0,
edge_threshold: 1.0,
};
let ascii = AsciImage::from_args(&args);
ascii.print();
Ok(())
}
Convert images to ASCII art with configurable width and character set
Support for color output (ANSI) and plain monochrome output
Library API for integration into other Rust projects
Fast, memory-efficient processing using Rust image crates
Common options:
width: target output width in characters
color: enable ANSI color output
charset: character set to use for density mapping
invert: invert brightness mapping
Contributions are welcome. Open issues for bugs or feature requests and submit PRs for fixes or improvements. Keep changes small and include tests where applicable.
MIT OR Apache-2.0 — see LICENSE file for details.
This project was inspired by and builds upon ideas from the ascii-view project:
Credit and differences:
If you'd like your repository acknowledged differently (additional attribution, direct quote, or a link to a specific file/commit), tell me what to include and I'll update this section.