npm / @napi-rs/image
@napi-rs/image
What changed in @napi-rs/image 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
1 breaking3 new APIs and options2 performance2 behavior and defaults7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@napi-rs/image 115 changes
Breaking changes 1
Replaced GPL imagequant with a clean-room MIT implementation of pngQuantize.
New APIs and options 3
Adds composite() with sharp blend modes, gravity, and tiling.
Adds native HEIC decoding and encoding on macOS through Apple ImageIO, without bundling an HEVC codec.
Adds opacity(factor) to scale the alpha channel for whole-image transparency adjustments.
Performance 2
The quantizer is about 1.5–2x faster and includes an Oklab/Ostromoukhov quality pass, with SIMD verified on x86/ARM.
Added runtime-dispatched 4-lane SIMD for pngQuantize's nearest-palette argmin.
Behavior and default changes 2
Adds native HEIC decoding and encoding on Windows through WIC; the backend is 8-bit, opaque-only, and exposes a Lossless mode.
PNG metadata is now used for automatic gamma detection during quantization, enabling more color-accurate results.
Fixes and other changes 7
metadata() now reflects pending transforms.
SVG content now scales to fill the upscaled raster instead of leaving padding.
The SVG format now reports as "svg".
Fixed detect_gamma_from_png_info.
Corrects swapped EXIF orientation rotations, so images with orientation metadata are rotated correctly.
Rebuilds the WASM package against emnapi 1.11.1 with a 16MB stack so threaded codecs work in the browser.
The WebP build was fixed.