meo-canvas
    Preparing search index...

    Interface EncodeOptions

    Quality and container settings that only some formats read.

    A format that ignores a field ignores it. The timing fields are the exception: naming a frame rate for a format with no clock is an error rather than something quietly dropped, because a caller who wrote fps and got a still image asked for something that did not happen.

    interface EncodeOptions {
        fps?: number;
        frameDelays?: readonly number[];
        loop?: number;
        lossless?: boolean;
        matte?: string;
        page?: number;
        quality?: number;
    }
    Index
    fps?: number

    Frames per second for an animated format.

    frameDelays?: readonly number[]

    Per-frame durations in milliseconds, one per written page.

    loop?: number

    How many times an animation plays. Absent plays it forever.

    lossless?: boolean

    Encode WebP without loss.

    matte?: string

    The colour transparency is flattened against, for a format with no alpha.

    page?: number

    Which page is written, counting from zero.

    Not only for a single-page format. Naming a page wins over a format that would otherwise gather them all, so a GIF asked for page 1 of three is a one-frame GIF and a PDF asked for one page is a one-sheet PDF. Left out, a spanning format writes every page and every other format writes the last one.

    An index past the last page is refused rather than clamped.

    quality?: number

    Lossy quality from 0 to 1, read by JPEG, WebP and AVIF.