mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-17 19:19:47 +00:00
- Update to newer APIs. - Avoid manual pixel-by-pixel copy in favour of decoding directly to desired format & bit depth. - Avoid use-after-free by cloning the Uint8Array Wasm memory view into a JS-owned Uint8Array right away.
13 lines
248 B
TypeScript
13 lines
248 B
TypeScript
interface RawImage {
|
|
buffer: Uint8Array;
|
|
width: number;
|
|
height: number;
|
|
}
|
|
|
|
interface AVIFModule extends EmscriptenWasm.Module {
|
|
decode(data: BufferSource): RawImage;
|
|
}
|
|
|
|
export default function(opts: EmscriptenWasm.ModuleOpts): AVIFModule;
|
|
|