ImageData

open class ImageData(    sw: Int,     sh: Int,     settings: ImageDataSettings = definedExternally) : ImageBitmapSource, TexImageSource, GPUCopyExternalImageSource, Serializable(source)

The ImageData interface represents the underlying pixel data of an area of a canvas element.

MDN Reference

Constructors

Link copied to clipboard
constructor(data: ImageDataArray, sw: Int, sh: Int = definedExternally, settings: ImageDataSettings = definedExternally)
constructor(sw: Int, sh: Int, settings: ImageDataSettings = definedExternally)

Properties

Link copied to clipboard

The read-only ImageData.colorSpace property is a string indicating the color space of the image data.

Link copied to clipboard

The readonly ImageData.data property returns a pixel data.

Link copied to clipboard
val height: Int

The readonly ImageData.height property returns the number of rows in the ImageData object.

Link copied to clipboard
val width: Int

The readonly ImageData.width property returns the number of pixels per row in the ImageData object.