Interface WebPAnimationEncodeOptions

interface WebPAnimationEncodeOptions {
    alphaQuality?: number;
    effort?: number;
    metadata?: Metadata;
    optimize?: boolean;
    quality?: number;
    sharpYuv?: boolean;
}

Hierarchy (View Summary)

Properties

alphaQuality?: number

Lossy frames: the alpha planes' quality (0-100), see WebPEncodeOptions.alphaQuality. Default: 100

effort?: number

How much effort lossy frames take (0-6), see WebPEncodeOptions.effort. Default: 2

metadata?: Metadata

Metadata to include, see Metadata

optimize?: boolean

Whether to store each frame as the area that changed since the frame before and merge identical frames, which usually makes files a lot smaller. The file shows the same animation either way, but only decodes to the same frames without it, which also encodes faster when little changes. Default: true

quality?: number

Lossy frames (0-100, like libwebp's quality: 75 is its default), much smaller than lossless ones. Without it the frames are lossless. Optimized lossy frames, like libwebp's, leave out 8x8 blocks that only changed a little (by up to 3 per channel at quality 85, 1 at 100)

sharpYuv?: boolean

Lossy frames: libwebp's sharp YUV conversion, see WebPEncodeOptions.sharpYuv. Default: false