mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-17 03:00:13 +00:00
Integrate JXL decoder
This commit is contained in:
@@ -77,6 +77,13 @@ async function webpDecode(data: ArrayBuffer): Promise<ImageData> {
|
||||
return decode(data);
|
||||
}
|
||||
|
||||
async function jxlDecode(data: ArrayBuffer): Promise<ImageData> {
|
||||
const { decode } = await import(
|
||||
/* webpackChunkName: "process-jxl-dec" */
|
||||
'../jxl/decoder');
|
||||
return decode(data);
|
||||
}
|
||||
|
||||
const exports = {
|
||||
mozjpegEncode,
|
||||
quantize,
|
||||
@@ -85,6 +92,7 @@ const exports = {
|
||||
optiPngEncode,
|
||||
webpEncode,
|
||||
webpDecode,
|
||||
jxlDecode,
|
||||
};
|
||||
export type ProcessorWorkerApi = typeof exports;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user