tinyimg - v1.0.0
    Preparing search index...

    Interface EncodeOptions

    What Image.bytes and its siblings take.

    interface EncodeOptions {
        effort?: "fancy" | "fast";
        lossless?: boolean;
        progressive?: boolean;
        quality?: number;
        stripMetadata?: boolean;
    }
    Index
    effort?: "fancy" | "fast"

    How much computation the encoder may spend. 'fancy' is the default.

    A separate axis from EncodeOptions.quality. Quality says what the output should look like; this says how hard to work to get there. 'fast' bounds the WebP encoder's 4x4 prediction search to its four whole-block modes, which over six fixtures at 800 wide measured 1.18x to 1.45x faster for between 8.8% smaller and 17.5% larger, never more than 0.05 dB apart. Flat-color illustrations pay the most, because hard diagonal edges are what the omitted modes are for.

    Formats with nothing to trade ignore it and do the exact thing.

    lossless?: boolean

    Use the format's lossless mode where it has one.

    progressive?: boolean

    Write a progressive or interlaced stream.

    quality?: number

    Quality for a lossy format, 1 through 100.

    stripMetadata?: boolean

    Drop EXIF and other metadata from the output.