Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function captureCanvasRGBA

    • Capture a rendered element ONCE and return its full-frame RGBA bytes.

      Use this when a spec needs whole-image analysis (histograms, per-region statistics) rather than a handful of point samples — measuring several regions of one identical frame is the point, and re-screenshotting per region would let an unrelated frame difference masquerade as a defect.

      The PNG is decoded in-page and handed back as base64 RGBA so the whole frame crosses the CDP bridge exactly once. See captureElementScreenshot for viewer-framebuffer versus embed/host screenshot routing.

      Parameters

      • page: Page

        Playwright page.

      • selector: string

        Element to capture.

      • route: PixelCaptureRoute

        Explicit framebuffer or composited capture intent.

      Returns Promise<CanvasFrameRGBA>

      Decoded pixel dimensions and the interleaved RGBA buffer.