browser-image
    Preparing search index...

    Options for createEditor.

    interface EditorOptions {
        canvas?: HTMLCanvasElement;
        engine?: "auto" | EditorEngine;
        colorMode?: ColorMode;
        worker?: boolean;
        previewSize?: number;
        settleDelay?: number;
        onRender?: (info: EditorRenderInfo) => void;
    }
    Index
    canvas?: HTMLCanvasElement

    The canvas the corrected image is drawn on. Default: a new canvas (Editor.canvas), for the caller to put in the page. Its pixel size follows the image shown, so give it a CSS size.

    engine?: "auto" | EditorEngine

    auto (default) uses the GPU when the browser has WebGL2 with float render targets, else the JS engine. gpu and cpu force one; gpu still falls back to cpu when WebGL2 is missing.

    colorMode?: ColorMode

    Default auto.

    worker?: boolean

    JS engine: run in Web Workers (default true).

    previewSize?: number

    JS engine: longest side, in pixels, of the preview drawn while the pipeline keeps changing. Default 1280. The GPU always shows the full size (shrunk only to what the GPU accepts).

    settleDelay?: number

    JS engine: once render has not been called for this many milliseconds, the full-size image replaces the preview. Default 250. A negative value keeps the preview.

    onRender?: (info: EditorRenderInfo) => void

    Called after each image drawn on the canvas.