Crates.io | ansipix |
lib.rs | ansipix |
version | |
source | src |
created_at | 2021-12-10 17:58:42.24319 |
updated_at | 2025-01-27 12:34:38.309217 |
description | Convert images to ANSI strings to print in a terminal |
homepage | |
repository | https://github.com/RubixDev/ansipix |
max_upload_size | |
id | 495810 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A Rust library for converting images to ANSI strings to print in a terminal
let img = ansipix::of_image(&image::open("example.png").unwrap(), (50, 50), 100, false);
println!("{}", img);
Refer to the docs for more information.
ansipix
uses the image
crate for
reading and resizing the image. The [of_image
] function uses
[FilterType::Nearest
] for resizing. You can specify a different one with the
[of_image_with_filter
] function.
use image::imageops::FilterType;
let img = ansipix::of_image_with_filter(&image::open("example.png").unwrap(), (32, 32), 255, false, FilterType::Triangle);
println!("{}", img);