mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 01:37:26 +00:00
Remove baseline image decoders, refactor decodeFile
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { canDecodeImage, fileToBitmap } from '../../lib/util';
|
||||
import { canDecodeImage, createImageBitmapPolyfill } from '../../lib/util';
|
||||
|
||||
export const name = 'Browser WebP Decoder';
|
||||
export const supportedMimeTypes = ['image/webp'];
|
||||
export async function decode(file: File): Promise<ImageBitmap> {
|
||||
return fileToBitmap(file);
|
||||
return createImageBitmapPolyfill(file);
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:max-line-length It’s a data URL. Whatcha gonna do?
|
||||
|
||||
Reference in New Issue
Block a user