rullino
    Preparing search index...

    Interface Renderer

    interface Renderer {
        backend: "gpu" | "cpu";
        gpu?: GpuContext;
        reason?: string;
        apply(
            image: LinearImage | Rgba8Image,
            edit: unknown,
            options?: { scale?: number },
        ): Promise<LinearImage>;
        destroy(): void;
        render(
            input: Uint8Array<ArrayBufferLike> | Rgba8Image,
            edit: unknown,
        ): Promise<Rendered>;
    }
    Index
    backend: "gpu" | "cpu"

    The GPU context, when the backend is 'gpu'.

    reason?: string

    Why 'auto' chose the CPU.

    • Releases the GPU device.

      Returns void

    • Renders an edit document and encodes the result as the document's output says. The input is 8-bit RGBA pixels, or an encoded image file (JPEG, PNG, WebP, AVIF, TIFF... decoded by sharp, EXIF orientation applied). PNG is written by rullino (8 or 16 bit); JPEG and WebP by sharp.

      Parameters

      • input: Uint8Array<ArrayBufferLike> | Rgba8Image
      • edit: unknown

      Returns Promise<Rendered>