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

Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255.

Link copied to clipboard
val height: Int

Returns the actual dimensions of the data in the ImageData object, in pixels.

Link copied to clipboard
val width: Int

Returns the actual dimensions of the data in the ImageData object, in pixels.