mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 01:59:57 +00:00
Upgrade AVIF decoding code
- 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.
This commit is contained in:
@@ -15,6 +15,5 @@ export async function decode(data: ArrayBuffer): Promise<ImageData> {
|
||||
rawImage.height,
|
||||
);
|
||||
|
||||
module.free_result();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user