resim
v0.1.3
Published
Fast image manipulation library for JavaScript world
Readme
Rust package
This crate contains both the pure image transform logic and the wasm bindings exposed to browser consumers.
Structure
src/core.rsimplements raw RGBA pixel transforms.src/wasm.rsexposes the browser-facing API withwasm-bindgen.src/lib.rsre-exports the core functions and wasm entrypoints.
Current transforms
- grayscale
- invert
- blur
- brightness
- contrast
- threshold
Local workflow
Run tests from this directory once Rust is installed:
cargo testGenerate the wasm package for the demo app:
wasm-pack build . --target web --out-dir pkg --releaseIntended API style
The public browser-facing API stays ImageData-first:
import init, { contrastImageData } from "@sinansonmez/resim";
await init();
const next = contrastImageData(imageData, 25);The wasm package also exposes getTransformCatalog() so browser consumers can inspect
the current transform metadata and build UI around the supported operations.
