5e29723b05
Bump `squoosh` to the latest version, currently commit [cad09160](cad09160b6
).
Ideally, we would use the version published to npm but it hasn't been published in [two months](https://www.npmjs.com/package/@squoosh/lib?activeTab=versions) and we have a patch (#23565) that isn't available upstream.
This also is a precursor to getting support for AVIF.
- Fixes #27092
- Fixes #26527
- Reapplies the patch from #23565
32 lines
614 B
TypeScript
32 lines
614 B
TypeScript
// eslint-disable-next-line no-shadow
|
|
export const enum AVIFTune {
|
|
auto,
|
|
psnr,
|
|
ssim,
|
|
}
|
|
|
|
export interface EncodeOptions {
|
|
cqLevel: number
|
|
denoiseLevel: number
|
|
cqAlphaLevel: number
|
|
tileRowsLog2: number
|
|
tileColsLog2: number
|
|
speed: number
|
|
subsample: number
|
|
chromaDeltaQ: boolean
|
|
sharpness: number
|
|
tune: AVIFTune
|
|
}
|
|
|
|
export interface AVIFModule extends EmscriptenWasm.Module {
|
|
encode(
|
|
data: BufferSource,
|
|
width: number,
|
|
height: number,
|
|
options: EncodeOptions
|
|
): Uint8Array
|
|
}
|
|
|
|
declare var moduleFactory: EmscriptenWasm.ModuleFactory<AVIFModule>
|
|
|
|
export default moduleFactory
|