Overview
Drop a photo into a browser, tune it into a good-looking 1-bit image, and print it on the Star TSP143 receipt printer in the living room. It’s the modern Game Boy Camera trick — which is exactly why it isn’t live for the whole world: it prints to my printer.
How It Works
All the image work — resize, tone, dither, and packing to 1-bit rows — happens in the browser canvas. The page POSTs the packed bytes to a tiny Python server (standard library only), which wraps them in ESC/POS framing and streams them over raw TCP 9100 through StarBridge to the USB printer.
browser (canvas: resize → tone → dither → pack bits)
| POST /api/print { width, rows, base64 packed 1-bit rows }
v
server.py (ESC/POS framing: ESC @, GS L/W, GS v 0, feed, cut)
| raw TCP 9100, half-close on done
v
StarBridge (via Tailscale) --USB--> Star TSP143
The key design decision: dithering happens in the browser, and the exact packed bytes shown in the preview are what get printed. The server never re-renders, so there’s no double-dithering — the preview is byte-for-byte what comes out on paper.
Current Status
Working on the home printer; deliberately not exposed publicly.