image-to-asciilisted
Install: claude install-skill vinsonconsulting/claude-skill-foundry
# image-to-ascii
Convert an image file to ASCII art from the command line — to stdout, a `.txt` file,
or a rendered `.png`/`.svg` — using shape-aware glyph matching. The converter is
`scripts/image_to_ascii.py`: Pillow-only, pure-Python, Python 3.9+.
## Mental model
- A naive ASCII converter picks one glyph per cell off a brightness ramp
(`" .:-=+*#%@"`). That is nearest-neighbour downsampling — every cell is treated as
a pixel, so edges come out jagged and curves look like staircases.
- This converter instead reduces **both** each glyph **and** each image cell to a
**6D shape vector** (six staggered sampling circles in a 2×3 grid) and matches the
glyph whose *shape* is closest. A diagonal edge picks `/` or `\`, a top bar picks
`"`/`^`, a base picks `_`. Edges stay crisp because shape, not just average
brightness, drives the choice.
- Glyph vectors are computed by **actually rasterizing the bundled font**, so the
match reflects the real ink — and `png`/`svg` output draws with that same font, so
the rendered image is self-consistent with the text.
- **Polarity:** by default **dark pixels → dense glyphs** (`@`, `#`), which looks
right as text on a light background (a README, a `.txt`). For light-on-dark output
(terminal style, e.g. white-on-black), add `--invert`.
For the full technique — circle geometry, the contrast-enhancement formulas, the
luminance coefficients, caching — read `references/technique.md`.
## Setup
The converter needs Pillow (nothing