nanojpeg-wasm
v0.0.7
Published
10KiB WebAssembly-based JPEG encoder for ServiceWorker
Downloads
10
Maintainers
Readme
nanojpeg-wasm
Nanojpeg compiled WebAssembly for ServiceWorker, 10KiB size uncompressed.
nanojpeg
http://svn.emphy.de/nanojpeg
install
npm i --save nanojpeg-wasm
API
interface Result {
isGrey: boolean
width: number,
height: number,
data: Uint8Array,
}
declare function Decode(image: ArrayBuffer): Result;
build.sh
Dependency:
- Clang LLVM
- Bynaryen
- Emscripten SDK
Dir /libc from https://github.com/harfbuzz/harfbuzzjs/tree/main/libc
https://github.com/harfbuzz/harfbuzzjs/blob/main/nanojpeg/build.sh