bokuweb / image-diff-rs

This project provides an image differencing library that supports PNG,JPEG,GIF,TIFF,and WebP formats for Node.js, Deno, and Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image-diff-rs

Build Status

This project provides an image differencing library that supports PNG,JPEG,GIF,TIFF,and WebP formats for Node.js, Deno, and Rust. For more details, please refer to each respective directory.

The code for Node.js and Deno is generated using wit-bindgen and jco.

Demo

img1 img2 diff

Generate JS code from wasm component.

AR=llvm-ar CFLAGS='--sysroot ../wasi-sdk/share/wasi-sysroot' cargo wasi build --release
wasm-tools component new target/wasm32-wasi/release/image_diff_wasm.wasm -o wasm/component.wasm --adapt wasm/wasi_snapshot_preview1.wasm
jco transpile wasm/component.wasm -o js --name index && mv js/index.js js/index.mjs

About

This project provides an image differencing library that supports PNG,JPEG,GIF,TIFF,and WebP formats for Node.js, Deno, and Rust.

License:MIT License


Languages

Language:JavaScript 68.0%Language:Rust 31.3%Language:C 0.7%