browser-image
    Preparing search index...

    Created by createEditor.

    interface Editor {
        canvas: HTMLCanvasElement;
        engine: EditorEngine;
        image: ImageData | null;
        setImage(input: ImageInput): Promise<void>;
        render(p: Pipeline): Promise<boolean>;
        export<O extends RunOptions | undefined = undefined>(
            p: Pipeline,
            options?: O,
        ): Promise<RunResult<O>>;
        dispose(): void;
    }
    Index
    canvas: HTMLCanvasElement

    The canvas the image is drawn on. If the GPU is lost (the browser drops the WebGL context), the editor switches to the JS engine on a new canvas, which takes the old one's place in the page, class and style.

    engine: EditorEngine

    The engine in use now.

    image: ImageData | null

    The decoded image (sRGB, full size), or null before setImage.

    • Shows the image corrected by p. Call it on every slider move: calls are coalesced, and only the latest pipeline is drawn. Resolves with true once p is on the canvas, or false when a newer call superseded it.

      autoStretch takes its statistics from the full-size image, so the preview has the same range as the final result.

      Parameters

      Returns Promise<boolean>