Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Convert an interleaved RGBA byte buffer — the layout getImageData() returns — to a one-value-per-pixel luminance array using the Rec.709 weights. Alpha is ignored: the canvas is already composited.

      Parameters

      • rgba: Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike>

        Interleaved RGBA bytes, at least width * height * 4 long.

      • width: number

        Image width in pixels.

      • height: number

        Image height in pixels.

      Returns Float32Array

      A Float32Array of width * height luminance values in [0, 255].

      If the dimensions are not positive or the buffer is too short.