mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 16:57:26 +00:00
Adding resize preprocessor (#152)
* Adding resize preprocessor * Using ! on form * Haha oops * Using createImageBitmapPolyfill * Updating package.json * Oops again * Ooops again
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
import { QuantizeOptions, defaultOptions as quantizerDefaultOptions } from './imagequant/quantizer';
|
||||
import { ResizeOptions, defaultOptions as resizeDefaultOptions } from './resize/resize';
|
||||
|
||||
interface Enableable {
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface PreprocessorState {
|
||||
quantizer: Enableable & QuantizeOptions;
|
||||
resize: Enableable & ResizeOptions;
|
||||
}
|
||||
|
||||
export const defaultPreprocessorState = {
|
||||
export const defaultPreprocessorState: PreprocessorState = {
|
||||
quantizer: {
|
||||
enabled: false,
|
||||
...quantizerDefaultOptions,
|
||||
},
|
||||
resize: {
|
||||
enabled: false,
|
||||
...resizeDefaultOptions,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user