mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 09:39:15 +00:00
Creating fallbacks for all ImageBitmap usage & refactoring. (#175)
Fixes #173
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { canDecodeImage, createImageBitmapPolyfill } from '../../lib/util';
|
||||
import { canDecodeImage, nativeDecode } from '../../lib/util';
|
||||
|
||||
export const name = 'Browser WebP Decoder';
|
||||
export async function decode(blob: Blob): Promise<ImageBitmap> {
|
||||
return createImageBitmapPolyfill(blob);
|
||||
export async function decode(blob: Blob): Promise<ImageData> {
|
||||
return nativeDecode(blob);
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:max-line-length It’s a data URL. Whatcha gonna do?
|
||||
|
||||
Reference in New Issue
Block a user