Skip to content

v3.2.3 — Braille portrait (recognizable Ben)

Choose a tag to compare

@1bcMax 1bcMax released this 11 Apr 22:12
· 351 commits to main since this release
c6737da

User feedback on v3.2.2: "看不清" — the portrait was still too fuzzy to recognize. chafa's half-block output looked like a coloured blob at banner sizes. Switched converters and settings; you can now actually see it's Benjamin Franklin.

What changed

Converter: chafa → ascii-image-converter in braille mode

Braille characters (U+2800..U+28FF) encode 2×4 dot matrices per cell, giving 2.7× the effective resolution of chafa's half-block mode at the same visible size. For a face — which is all about silhouette and feature placement, not colour — braille is the right tool.

  • Half-blocks are for colour images (photos, screenshots). Each cell packs two 3-byte RGB values into one character.
  • Braille is for line portraits. Every dot is independent, every cell is 8 "pixels", and the result looks like a high-res line drawing instead of a mushy heatmap.

Portrait size: 28×14 → 34×16

Same cropped Duplessis painting source. At 34×16 braille, the effective pixel grid is 68×64 = 4,352 "pixels" — enough to show Ben's hairline, eye sockets, nose, mouth, collar, and shoulders clearly.

Conversion command

ascii-image-converter ben-face.jpg --dimensions 34,16 --braille --threshold 110

Threshold swept from 90→130; picked 110 as the cleanest silhouette without losing collar/shoulder definition.

Tinting

Braille characters carry no colour on their own, so we wrap them in chalk.hex('#E8E8E8') at render time for a dim-white "pencil portrait" look. The FRANKLIN gold → emerald gradient next to it is untouched.

Text alignment

The FRANKLIN gradient block now starts at portrait row 5, so it aligns with Ben's face region (head rows 1-4, face rows 5-10, shoulders 11-16) — the classic "portrait + nameplate" composition.

Layout thresholds

Side-by-side threshold raised 100 → 105 cols (34-col portrait + 3-col gap + 65-col FRANKLIN text + 3-col margin).

Dependencies

  • No new runtime deps. The portrait is baked into src/banner.ts as a plain Unicode string array. The npm package doesn't ship ascii-image-converter.
  • Build-time dep (optional): ascii-image-converter — only needed if we ever regenerate the portrait.

Not changed

Every other subsystem — franklin social, agent loop, wallet, tools, sessions. Identical to v3.2.2.


npm: @blockrun/[email protected] · Full changelog: v3.2.2...v3.2.3