finds.dev← search

// the find

Postcard/png2escpos

★ 2 · C · MIT · updated Jan 2015

Quickly convert PNG files to ESC/POS format, for printing on Epson thermal point-of-sale printers.

A small C utility that reads a PNG and writes ESC/POS bitmap commands to stdout, so you can pipe the output straight to a USB thermal printer. It does exactly one thing: raster image printing on Epson POS hardware. Not a library, not a framework — a pipe-friendly CLI.

Dead simple integration: pipe stdout to /dev/usb/lp0 and you're done, no config files or drivers to fight. Single C file with libpng as the only dependency keeps the build trivial on any POSIX system. MIT licensed with no strings attached. The stdout-as-output design composes naturally with shell scripting.

Abandoned in 2015 with 2 stars — any ESC/POS quirks you hit are yours to debug alone. Supports only Epson's raster image commands; no text mode, no QR codes, no barcodes, so the moment you need anything beyond printing a PNG it's a dead end. No error handling visible in the README, so a malformed PNG or wrong image width will likely produce garbage output or a crash. Width must match the printer's paper width or the output will be garbled — nothing in the tool checks or warns about this.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →