v0.8.0 — WebAssembly bindings
What's new
WebAssembly support (wasm feature)
djvu-rs can now be compiled to WebAssembly via wasm-pack:
wasm-pack build --target bundler --features wasmNew public API:
WasmDocument::from_bytes(data: &[u8])— parse a DjVu fileWasmDocument::page_count()— number of pagesWasmDocument::page(index: u32)— get a page handleWasmPage::dpi()— native resolutionWasmPage::width_at(dpi)/height_at(dpi)— dimensions at target DPIWasmPage::render(dpi)→Uint8ClampedArray(RGBA pixels, ready forImageData)
See examples/wasm/ for a complete drag-and-drop browser demo.
IW44 wavelet fix (v0.7.1)
Compact-plane reconstruction now starts the inverse wavelet at the correct scale (16/sub instead of always 16), fixing a 99.7% pixel mismatch on subsampled chroma planes.