eger
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.
[]
= "1"
use *;
let config = builder
.from_file
.max_width
.color_depth
.build?;
let ascii = image_to_string?;
println!;
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 intokio, enables thevideomodule (requiresffmpeg/ffprobeonPATHat runtime), plus the async (_async) variants of the image API.wasm(off by default) — pulls inwasm-bindgen, enables thewasmmodule. Only meaningful when targetingwasm32.
Testing & benchmarks
See TESTS_AND_BENCHMARKS.md for the full
integration-test and Criterion-benchmark suite, and what's verified where.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.