mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 09:39:15 +00:00
Use oxipng raw api
This commit is contained in:
@@ -18,9 +18,7 @@ export async function encode(
|
||||
imageData: ImageData,
|
||||
options: EncodeOptions,
|
||||
) {
|
||||
const pngBlob = await abortable(signal, canvasEncode(imageData, 'image/png'));
|
||||
const pngBuffer = await abortable(signal, blobToArrayBuffer(pngBlob));
|
||||
return workerBridge.oxipngEncode(signal, pngBuffer, options);
|
||||
return workerBridge.oxipngEncode(signal, imageData, options);
|
||||
}
|
||||
|
||||
type Props = {
|
||||
|
||||
Reference in New Issue
Block a user