Img2Num JavaScript
What is Img2Num?
Img2Num is a high-performance raster-to-vector conversion library that transforms images into SVGs. It is powered by WebAssembly (WASM) for speed, while providing easy-to-use JavaScript wrappers for integration into web or Node.js projects.
Features
- Fast raster vectorization with WASM backend.
- Typed array support: Works with
Uint8Array,Uint8ClampedArray, andInt32Array. - String outputs: Converts results directly into SVG strings.
- Runs on the calling thread: no hidden threads — wrap it in a Web Worker of your own if you want to keep the UI responsive.
- Zero dependencies: Pure WASM + JS with no external libraries required.
Resources
- HTML demo app (low-code): ESM variant) · IIFE variant) · UMD variant)
- Node.js console demo app (low-code): ESM variant · CommonJS variant
- React.js demo app
License
The JavaScript package is licensed under the following: