Pixel Data JS - v0.28.0
    Preparing search index...

    Function writeImageDataBuffer

    • Copies a pixel buffer into a specific region of an ImageData object.

      This function performs a direct memory copy from a Uint8ClampedArray into the target ImageData buffer. It supports both Rect objects and discrete coordinates.

      Parameters

      • target: ImageData

        The target to write into. Must match the rect width/height.

      • data: Uint8ClampedArray

        The source pixel data (RGBA).

      • rect: Rect

        A rect defining the destination region.

      Returns void

    • Parameters

      • target: ImageData

        The target to write into.

      • data: Uint8ClampedArray

        The source pixel data (RGBA). Must match the width/height.

      • x: number

        The starting horizontal coordinate in the target.

      • y: number

        The starting vertical coordinate in the target.

      • w: number

        The width of the region to write.

      • h: number

        The height of the region to write.

      Returns void