For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Function sampleImage

  • Get the pixel value of an image at a given position

    Parameters

    • image: HTMLImageElement
    • x: number
    • y: number

    Returns Pixel

    The pixel as {r, g, b, a} in a [0, 1] interval (and not in [0, 255])

Was this helpful?