eger 1.1.1

A high-level, parallel ASCII-art media pipeline built on top of iascii: images, video, GIFs, dithering, animated text/banners, and procedural illusions, all rendered to ANSI.
Documentation

eger

Crates.io Documentation License: MIT OR Apache-2.0

A high-level, parallel ASCII-art media pipeline built on top of iascii. Turn images, video, GIFs, and plain text into colored (or plain) ANSI terminal art — with Floyd–Steinberg / Atkinson / Bayer dithering, animated text and banners, per-region segment styling, non-Latin character ramps, and procedurally generated optical illusions, all sharing one rendering pipeline.

[dependencies]
eger = "1"
use eger::prelude::*;

let config = Config::builder(MediaType::Image)
    .from_file("cat.png")
    .max_width(120)
    .color_depth(ColorDepth::TrueColor)
    .build()?;
let ascii = eger::image::image_to_string(std::path::Path::new("cat.png"), &config)?;
println!("{ascii}");

What's inside

Module What it does
config Fluent Config/ConfigBuilder for input, output, sizing, and parallelism
image Single-image and Rayon-parallel batch image → ASCII rendering
video (feature video) Video → ASCII frame-sequence rendering, streamed through ffmpeg
render Output targets (stdout / file / String / Vec<String>), terminal-size detection, cursor-addressed diffed playback
text Text → ANSI coloring/animation: Typewriter, Rainbow, Wave, Blink, Marquee, Pulse, plus custom program/closure animations
banner Multi-line "big text" block-letter banners, same animation styles as text
colorize Per-cell color animation for any block of plain ASCII text (converted image, GIF/video frame, banner, ...), including a static two-color Gradient, a Transformed wrapper for layering a ColorTransform on any animation, and fully custom coloring functions
color Reusable ColorTransforms — grayscale, invert, sepia, brightness/contrast/saturation, hue rotation, tinting, composition — shared by dither, colorize, and wasm
segment Partitions a converted frame into numbered/named structures so one region can be bolded, colored, or animated independently
dither Floyd–Steinberg / Atkinson error diffusion and Bayer ordered dithering, for reducing banding on coarse ANSI palettes
script Ready-made non-Latin character ramps — Cyrillic, Greek, CJK, Devanagari, Hebrew, Arabic, Braille, block/shade
illusions Procedurally generated optical illusions (café wall, Hermann grid, twisted cord, animated rotating rings) rendered through the same pipeline
wasm (feature wasm, wasm32 only) Thin wasm-bindgen wrapper for rendering ASCII art in a browser
error Unified EgerError / Result

video also enables GIF playback (video::play_gif); GIF decoding (image::gif_to_lines) is available without the video feature.

Feature flags

  • video (off by default) — pulls in tokio, enables the video module (requires ffmpeg/ffprobe on PATH at runtime), plus the async (_async) variants of the image API.
  • wasm (off by default) — pulls in wasm-bindgen, enables the wasm module. Only meaningful when targeting wasm32.

Testing & benchmarks

See TESTS_AND_BENCHMARKS.md for the full integration-test and Criterion-benchmark suite, and what's verified where.

cargo test                    # unit + integration tests
cargo test --features video   # + video pipeline tests (needs ffmpeg)
cargo bench                   # full benchmark suite

License

Licensed under either of

at your option.