logo-art
Convert images to Unicode/True Color ANSI art for terminal display.
Uses half-block characters (▄/▀) to pack two pixel rows per terminal line with 24-bit true color escape sequences. Algorithm ported from dom111/image-to-ansi.
Usage
use ;
// Embed a PNG at compile time
const LOGO: & = include_bytes!;
API
image_to_ansi(image_data: &[u8], width: u32) -> String— Convert image bytes to an ANSI escape code string.widthsets the output width in terminal columns; height is derived proportionally.print_image(image_data: &[u8], width: u32)— Convenience wrapper that prints directly to stdout.
Example CLI
Features
- True color (24-bit) ANSI output
- Transparency support (renders transparent pixels with default terminal colors)
- Proportional scaling from a single width parameter
- Minimal dependencies (
imagecrate with PNG feature only)
License
MIT