Crates.io | make_it_braille |
lib.rs | make_it_braille |
version | |
source | src |
created_at | 2024-02-10 01:30:53.721306 |
updated_at | 2024-11-07 01:40:02.40512 |
description | A CLI tool and library to manipulate unicode braille images |
homepage | |
repository | |
max_upload_size | |
id | 1134587 |
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 |
this crate provides methods to create, manipulate and output images made out
of unicode braille characters such as ⠝
.
use image::imageops::FilterType;
use make_it_braille::{BrailleImg, dithering::Sierra2Row};
let mut img = image::open("image.png").unwrap();
img = img.resize_exact(64, 64, FilterType::Triangle);
let mut img = BrailleImg::from_image(img, Sierra2Row, false);
println!("{}", img.as_str(true, true));
makes things braille
install with cargo install -F bin --locked --git "https://github.com/Juliapixel/make_it_braille.git"
do make_it_braille -h
to get a short help
make_it_braille --width 80 "https://upload.wikimedia.org/wikipedia/en/9/9a/Trollface_non-free.png"
⠁⠁⠁⠁⠁⠁⠁⠁⠁⣀⣠⣠⣄⣤⣠⣄⠤⣠⣀⡄⣠⣀⣀⣀⣀⣀⣀⡀⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁
⠁⠁⠁⠁⠁⠁⠁⣰⣾⣿⣿⠿⣋⡭⢶⣚⣻⣭⣭⣯⣽⣙⣛⣳⠷⣾⢖⣟⣳⣺⣖⣶⣤⣄⠁⠁⠁⠁⠁⠁
⠁⠁⠁⠁⠁⢀⣾⣿⣿⣫⡵⣻⢕⣫⣽⣶⣷⣶⣶⣦⡻⣿⣿⣿⣿⣿⢭⣭⣭⣭⣭⡛⢿⣿⣿⣦⠁⠁⠁⠁
⠁⠁⠁⠁⢀⣾⣿⣿⣿⣿⣾⣵⠟⠛⠉⠉⠉⡙⠛⠿⣿⣿⣿⣿⢿⣿⣸⣿⠿⠿⢿⣿⣾⣿⣿⣿⡄⠁⠁⠁
⠁⠁⢀⢤⣨⣏⠿⡻⣿⣈⢿⣁⢐⣀⣀⣀⣀⠛⠻⠦⠁⣻⣷⣿⠛⠛⠉⠁⠁⣀⣀⣀⣹⣕⣋⣛⣛⢦⡀⠁
⠁⣰⢵⡿⢁⣤⣶⢤⣤⣉⠙⠛⠛⠋⣁⣴⣿⣿⣷⣦⣾⣿⣿⣿⣿⡆⢰⣿⣿⣿⠿⡿⠟⠛⠛⠛⢭⢳⡝⠁
⠰⣟⢿⠁⡾⠟⠃⢀⡉⠛⠿⣿⣿⣿⡿⢿⠿⠟⡟⠛⢛⣿⡿⣿⣿⣷⣄⠙⠻⣿⣦⣤⣤⡟⢻⣿⣾⢫⡏⠁
⠁⢻⡹⣇⢹⣶⣦⠘⠿⣷⣦⡀⣈⡉⠛⠻⠿⣿⡄⢻⣍⣁⣉⣿⡯⡿⠟⢀⣤⣬⣝⣻⡿⠃⠁⢹⣗⣫⠆⠁
⠁⠁⠙⢺⣽⣿⣿⣦⠁⢄⡉⠁⠘⠿⢿⣶⣦⠄⣈⣉⡙⠛⠛⠻⠶⠤⠶⠿⠛⠛⠋⣁⡀⢤⠁⢸⣿⡇⠁⠁
⠁⠁⠁⠁⠻⣿⣿⣿⣷⡌⠻⠇⣠⣤⣀⠈⠉⠁⠻⠿⠿⠿⠆⢸⡶⡶⠁⠶⠿⠷⠁⠿⠁⠈⠁⢸⣿⡅⠁⠁
⠁⠁⠁⠁⠁⠹⣿⣿⣿⣿⣦⣄⠛⢿⣿⣿⠃⣰⣤⣄⣀⡀⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⢸⣿⡆⠁⠁
⠁⠁⠁⠁⠁⠁⠈⠻⡿⠿⣿⠻⣷⣤⣈⠋⠠⢿⣿⣿⣿⡇⢸⣿⣾⡆⢰⣶⠆⢠⡶⢀⣎⠐⢠⣿⣿⠇⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠈⠓⠮⣟⡲⢯⣝⡻⢶⣦⣤⣤⣉⣀⣈⣉⣙⣀⣘⣉⣀⣉⣠⣤⣤⣾⣿⣿⣿⡇⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠉⠓⠺⢭⣗⣮⠭⡝⣛⢿⠻⠿⠯⠿⠽⠿⠿⠿⢿⣛⣭⣶⡿⢋⣿⡇⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠈⠙⠻⠿⣷⣾⣿⣽⣯⣿⣻⣻⣻⣻⣻⣽⣭⣵⣾⣿⣿⠃⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠈⠉⠉⠛⠛⠿⠿⠿⡿⢿⢿⡻⡿⠛⠋⠁⠁⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁
note: also works with local files