meo-skia-canvas
    Preparing search index...

    Class ImageData

    Index
    bytesPerPixel: number

    Bytes each pixel occupies under ImageData.colorType. The only way to walk data correctly for a non-rgba format.

    🧪 Not in the HTML Canvas standard.

    colorSpace: ColorSpace

    Color space the components are in. Unlike a browser's, which only ever reports "srgb" or "display-p3", this carries whichever ColorSpace the data was read in.

    colorType: ColorType

    🧪 Not in the HTML Canvas standard.

    data: Uint8ClampedArray

    The pixels themselves, row by row from the top left.

    Typed as Uint8ClampedArray for compatibility, and it is one for the eight-bit formats. For a float ImageData.colorType the same bytes are the encoding of wider components, so walk them by ImageData.bytesPerPixel rather than four at a time.

    height: number

    Number of rows.

    prototype: ImageData

    The prototype every instance inherits from.

    width: number

    Number of pixels per row.

    • Copy the pixels into a Sharp image. Sharp is an optional peer dependency and must be installed separately.

      🧪 Not in the HTML Canvas standard.

      Returns Sharp