dotmax-0.1.5 has been yanked.
dotmax
Render anything in terminal braille. Images, GIFs, videos, webcam - one line of code.
Install
One-Line Usage
use quick;
show_file?; // Any image
show_file?; // Animated GIF (plays automatically)
show_file?; // Video (requires 'video' feature)
show_webcam?; // Live webcam (requires 'video' feature)
Features
| Feature | What it enables | Install |
|---|---|---|
image |
PNG, JPG, GIF, APNG, BMP, WebP, TIFF | cargo add dotmax --features image |
svg |
SVG vector graphics | cargo add dotmax --features svg |
video |
Video + webcam (needs FFmpeg) | cargo add dotmax --features video |
# Cargo.toml - pick what you need
[]
= { = "0.1", = ["image"] } # Images only
= { = "0.1", = ["image", "svg"] } # Images + SVG
= { = "0.1", = ["video"] } # Video + webcam
Video feature requires FFmpeg installed on your system.
Quick API Reference
use quick;
// Display (blocks until keypress or video ends)
show_file?; // Auto-detect format
show_image?; // Static image only
show_webcam?; // Default webcam
show_webcam_device?; // Webcam by index
show_webcam_device?; // Webcam by path
// Load without displaying
let grid = load_image?; // Returns BrailleGrid
show?; // Display manually
// Create empty grid
let mut grid = grid?; // Terminal-sized
Drawing Primitives
use *;
let mut grid = grid?;
draw_line?;
draw_circle?;
draw_rectangle?;
show?;
Animation Loop
use AnimationLoop;
new
.fps
.on_frame
.run?;
Examples
# Basic (no features needed)
# Images
# Animated GIF/APNG
# Video (needs FFmpeg)
# Webcam (needs FFmpeg + camera)
Tuners
Tuners let you find the best render settings visually. Adjust dithering, brightness, contrast, etc. in real-time and see the results instantly.
Why use a tuner?
Different images/videos look best with different settings. Instead of guessing values in code, use the tuner to experiment live, then copy the settings you like.
Webcam Tuner
Video/Image Tuner
Tuner Controls
| Key | Action |
|---|---|
| D | Cycle dithering (Floyd/Bayer/Atkinson/None) |
| T | Toggle threshold (Auto/Manual) |
| +/- | Adjust threshold ±10 |
| [/] | Adjust threshold ±1 |
| B/b | Brightness +/- |
| C/c | Contrast +/- |
| G/g | Gamma +/- |
| M | Toggle color mode (Mono/Color) |
| R | Reset all settings |
| H | Help |
| Q | Quit |
What the settings do
- Dithering: How dots are distributed. Floyd-Steinberg = smooth gradients, Bayer = patterned, Atkinson = high contrast, None = pure threshold
- Threshold: Brightness cutoff for black vs white. Auto (Otsu) calculates optimal value. Manual lets you pick 0-255
- Brightness/Contrast/Gamma: Standard image adjustments. Useful for dark or washed-out sources
Performance
| Operation | Time |
|---|---|
| Frame render (80×24) | ~2μs |
| Image load + render | ~10ms |
| 60fps animation budget | 16.6ms (we use 1.6μs) |
License
MIT OR Apache-2.0