Type Alias ImageEncodeOptions
type ImageEncodeOptions = {
budgetMs?: number;
format: "webp";
lossless?: boolean;
quality: number;
width?: number;
}
budgetMs?: number;
format: "webp";
lossless?: boolean;
quality: number;
width?: number;
}
Properties
Optionalbudget Ms
budgetMs?: number
the time the encoder may spend, in milliseconds; absent means no limit. It is a hint for an encoder that can trade quality for time, and the proxy stops waiting at this time either way
format
format: "webp"
Optionallossless
lossless?: boolean
encode without loss, so quality has no effect; absent means lossy
quality
quality: number
1 to 100
Optionalwidth
width?: number
the widest the output may be, in pixels; absent means the source width
what an ImageEncoder is asked to produce