Skip to content

@napi-rs/image@1.5.0

Compare
Choose a tag to compare
@Brooooooklyn Brooooooklyn released this 16 Jan 16:03
· 55 commits to main since this release
@napi-rs/image@1.5.0
c111cd9

Core updates

Fast Resize

Powered by https://github.com/Cykooz/fast_image_resize

Performance

x86_64 (AVX2)

OS:  Windows 11 x86_64
Kernel: 10.0.22621
CPU: AMD Ryzen 9 5950X (32) @ 3.400GHz
Memory: 2535MiB / 32055MiB
sharp resize: 415.966ms
@napi-rs/image resize: 529.884ms
fast resize: 316.731ms

ARM64 (NEON)

OS: macOS 13.1 22C65 arm64
Host: MacBookPro18,2
Kernel: 22.2.0
CPU: Apple M1 Max
Memory: 8915MiB / 65536MiB
sharp resize: 616.549ms
@napi-rs/image resize: 525.776ms
fast resize: 431.185ms
const output = await new Transformer(NASA).fastResize({
  width: 1024,
  filter: FastResizeFilter.Lanczos3,
}).png()

We are keeping the resize API because the ResizeFilter algorithm is different between the fast_image_resize and image crates.

overlay

writeFileSync(
  'output-overlay-png.png',
  await new Transformer(PNG).overlay(PNG, 200, 200).png()
)

image

What's Changed

New Contributors

  • @liby made their first contribution in #32

Full Changelog: https://github.com/Brooooooklyn/Image/compare/@napi-rs/image@1.4.4...@napi-rs/image@1.5.0