fewtarius/img2ans
A simple utility for converting bitmap images to ANSI graphics
What's novel
A simple utility for converting bitmap images to ANSI graphics
Code Analysis
11 files read · 7 roundsConverts PNG/JPEG/BMP images to CP437 ANSI art, PETSCII art, or BIN format with multiple dithering algorithms, color modes (16/256/24-bit), resampling methods, and SAUCE metadata support.
Strengths
Genuinely deep single-file implementation with real algorithms: exhaustive cell search over ~1152 glyph/color candidates, cell-granularity error diffusion dithering with two distinct error models (coverage-blend for shades vs pixel-by-pixel for blocks), gamma-correct resampling, and three color output modes. The release pipeline is production-grade with macOS signing/notarization, static Linux, Windows cross-compile, and Homebrew tap auto-update.
Weaknesses
No dedicated test suite — only CI smoke tests that verify the binary runs and produces output, with no unit tests for the color metrics, dithering, or glyph selection algorithms. The single-file architecture (75KB C file) makes the core algorithms harder to navigate and test in isolation, and the man page incorrectly states MIT license while the code and Homebrew formula say GPL-3.0.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
9
Contributors
1
Files
14
Active weeks
3
Repository
Language
C++
Stars
0
Forks
0
License
GPL-3.0