mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 09:39:15 +00:00
Nits by Jake
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
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 createImageBitmapPolyfill(file);
|
||||
export async function decode(blob: Blob): Promise<ImageBitmap> {
|
||||
return createImageBitmapPolyfill(blob);
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:max-line-length It’s a data URL. Whatcha gonna do?
|
||||
@@ -13,6 +12,7 @@ export function isSupported(): Promise<boolean> {
|
||||
return canDecodeImage(webpFile);
|
||||
}
|
||||
|
||||
const supportedMimeTypes = ['image/webp'];
|
||||
export function canHandleMimeType(mimeType: string): boolean {
|
||||
return supportedMimeTypes.includes(mimeType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user