mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 09:39:15 +00:00
All the encoders that Chrome/Safari/Firefox support out of the box. (#74)
* All the encoders that Chrome/Safari/Firefox support out of the box. * Typo
This commit is contained in:
16
src/codecs/browser-tiff/encoder.ts
Normal file
16
src/codecs/browser-tiff/encoder.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { canvasEncode } from '../../lib/util';
|
||||
import { canvasEncodeTest } from '../generic/util';
|
||||
|
||||
export interface EncodeOptions { }
|
||||
export interface EncoderState { type: typeof type; options: EncodeOptions; }
|
||||
|
||||
export const type = 'browser-tiff';
|
||||
export const label = 'Browser TIFF';
|
||||
export const mimeType = 'image/tiff';
|
||||
export const extension = 'tiff';
|
||||
export const defaultOptions: EncodeOptions = {};
|
||||
export const featureTest = () => canvasEncodeTest(mimeType);
|
||||
|
||||
export function encode(data: ImageData, options: EncodeOptions) {
|
||||
return canvasEncode(data, mimeType);
|
||||
}
|
||||
Reference in New Issue
Block a user