docs.rs failed to build terminal-pixel-animation-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
terminal-pixel-animation
Render pixel images as Unicode characters in the terminal with True Color support.
This library converts RGB pixel data into terminal-friendly Unicode art using two rendering backends written in high-performance systems languages (Odin and Zig), exposed to Rust via C FFI.
Features
| Renderer | Language | Cells per pixel | Resolution | Best for |
|---|---|---|---|---|
| Braille | Odin | 2x4 (8 px/cell) | High | Detailed still images, thumbnails |
| Half-block | Zig | 1x2 (2 px/cell) | Medium | High frame-rate video playback |
- Aspect-ratio-preserving resize with letterboxing
- ANSI True Color (24-bit) output helpers
- Luminance-weighted color averaging with saturation boost (Braille mode)
Installation
[]
= "0.1"
Note: Requires
odin,zig, andobjcopycompilers in yourPATHat build time.
Quick Start
use ;
// Your RGB8 pixel buffer (width * height * 3 bytes)
let pixels: = load_your_image;
let = ;
// Render into Braille cells (80 columns x 30 rows)
let cells = render_braille.unwrap;
// Print to terminal
print_braille_to_terminal;
API
Rendering
// Braille: 8 bytes per cell [utf8;4, R, G, B, _]
let cells = render_braille?;
// Half-block: 6 bytes per cell [R_fg, G_fg, B_fg, R_bg, G_bg, B_bg]
let cells = render_half_block?;
Terminal Output
print_braille_to_terminal;
print_halfblock_to_terminal;
Custom Rendering
The library returns raw cell buffers, so you can implement your own output:
let cells = render_braille?;
for row in 0..24
Building from Source
The build script compiles Odin and Zig source files into static libraries and links them into the Rust crate automatically.
Dependencies
- Rust (edition 2024)
- Odin compiler
- Zig compiler
objcopy(binutils)
Example
License
MIT