Integrate JXL decoder

This commit is contained in:
Surma
2020-02-06 14:31:27 -08:00
committed by Ingvar Stepanyan
parent 3697635bae
commit 36d23644aa
10 changed files with 481 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ export async function decodeImage(blob: Blob, processor: Processor): Promise<Ima
if (!canDecode) {
if (mimeType === 'image/avif') return await processor.avifDecode(blob);
if (mimeType === 'image/webp') return await processor.webpDecode(blob);
if (mimeType === 'image/jpegxl') return await processor.jxlDecode(blob);
// If it's not one of those types, fall through and try built-in decoding for a laugh.
}
return await builtinDecode(blob);