From 0b330cd55c5d57b8090f8b4026c8578549bf832a Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Fri, 20 Oct 2023 08:53:41 +0100 Subject: [PATCH] Align encoder with jxl --- src/features/decoders/qoi/worker/qoiDecode.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/features/decoders/qoi/worker/qoiDecode.ts b/src/features/decoders/qoi/worker/qoiDecode.ts index 0d88b09aa..50b21dd5e 100644 --- a/src/features/decoders/qoi/worker/qoiDecode.ts +++ b/src/features/decoders/qoi/worker/qoiDecode.ts @@ -1,12 +1,11 @@ -import type { QOIModule } from 'codecs/qoi/dec/qoi_dec'; +import qoiDecoder, { QOIModule } from 'codecs/qoi/dec/qoi_dec'; import { initEmscriptenModule, blobToArrayBuffer } from 'features/worker-utils'; let emscriptenModule: Promise; export default async function decode(blob: Blob): Promise { if (!emscriptenModule) { - const decoder = await import('codecs/qoi/dec/qoi_dec'); - emscriptenModule = initEmscriptenModule(decoder.default); + emscriptenModule = initEmscriptenModule(qoiDecoder); } const [module, data] = await Promise.all([