mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 10:09:45 +00:00
Updating oxi, adding interlace option (#1014)
This commit is contained in:
@@ -40,9 +40,12 @@ export default async function encode(
|
||||
options: EncodeOptions,
|
||||
): Promise<ArrayBuffer> {
|
||||
if (!wasmReady) {
|
||||
wasmReady = threads().then((hasThreads: boolean) => hasThreads ? initMT() : initST());
|
||||
wasmReady = threads().then((hasThreads: boolean) =>
|
||||
hasThreads ? initMT() : initST(),
|
||||
);
|
||||
}
|
||||
|
||||
const optimise = await wasmReady;
|
||||
return optimise(new Uint8Array(data), options.level).buffer;
|
||||
return optimise(new Uint8Array(data), options.level, options.interlace)
|
||||
.buffer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user