AVIF in worker

This commit is contained in:
Jake Archibald
2020-09-16 11:48:13 +01:00
parent 2583d689b9
commit 7776134bc2
9 changed files with 171 additions and 42 deletions

View File

@@ -0,0 +1,30 @@
export interface EncodeOptions {
minQuantizer: number;
maxQuantizer: number;
minQuantizerAlpha: number;
maxQuantizerAlpha: number;
tileRowsLog2: number;
tileColsLog2: number;
speed: number;
subsample: number;
}
export const type = 'avif';
export const label = 'AVIF';
export const mimeType = 'image/avif';
export const extension = 'avif';
export const defaultOptions: EncodeOptions = {
minQuantizer: 33,
maxQuantizer: 63,
minQuantizerAlpha: 33,
maxQuantizerAlpha: 63,
tileColsLog2: 0,
tileRowsLog2: 0,
speed: 8,
subsample: 1,
};
export interface EncoderState {
type: typeof type;
options: EncodeOptions;
}