Tech News
← Back to articles

Show HN: Rust -> WASM, K-Means Color Quantization Crate for Image-to-Pixel-Art

read original related products more articles

Live UI

Try the pixel-art converter instantly at https://gametorch.app/image-to-pixel-art

Free forever · no sign-up required · runs 100 % in your browser

A tiny Rust → WebAssembly library that turns any raster image into low-color pixel-art.

Features

K-means palette extraction with user-selectable color count or supply your own palette.

supply your own palette. Keeps transparency intact – only opaque pixels are processed.

Down-samples to a fixed tile grid (e.g. 64 × 64) using nearest-neighbour then scales back up – aspect-ratio preserved.

Pure client-side: the heavy lifting happens completely inside your browser thanks to WASM.

The public API exported via wasm-bindgen :

... continue reading