mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 09:39:15 +00:00
Add encode() and decode() types
This commit is contained in:
@@ -79,7 +79,7 @@ async function encodeImage({
|
||||
}: {
|
||||
bitmap: ImageData;
|
||||
encName: EncoderKey;
|
||||
encConfig: string | { [key: string]: any };
|
||||
encConfig: any;
|
||||
optimizerButteraugliTarget: number;
|
||||
maxOptimizerRounds: number;
|
||||
}) {
|
||||
@@ -94,7 +94,7 @@ async function encodeImage({
|
||||
bitmapIn.data,
|
||||
bitmapIn.width,
|
||||
bitmapIn.height,
|
||||
Object.assign({}, encoders[encName].defaultEncoderOptions, {
|
||||
Object.assign({}, encoders[encName].defaultEncoderOptions as any, {
|
||||
[optionToOptimize]: quality,
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user