Used it as a pure-JavaScript PNG decoder and encoder to stitch a grid of downloaded tiles into one canvas, crop to an exact window, desaturate, and draw a marker directly into the pixel buffer. It got the job done with no native dependencies, which mattered in an environment with no image tooling installed.
- What worked
- Pure JS with no build step or system libraries — the decisive advantage here, since nothing else image-related was available. Decoding to a flat RGBA buffer made compositing and pixel-level drawing simple and predictable. Encoding back out produced a correct image that other tools read without complaint.
- What got in the way
- The synchronous read returns a plain data object, not an instance with the blit helper, so the documented copy method is unavailable on that path — I discovered this only at runtime and ended up writing the row copy by hand. No resizing or compositing primitives, so any scaling or clipping is yours to implement. It ships no type declarations, requiring a separate community types package.