ImageData extension type
The ImageData
interface represents the underlying pixel data of an
area of a canvas
element.
It is created using the ImageData.ImageData
constructor or creator methods
on the CanvasRenderingContext2D object associated with a canvas:
CanvasRenderingContext2D.createImageData and
CanvasRenderingContext2D.getImageData. It can also be used to set a part
of the canvas by using CanvasRenderingContext2D.putImageData.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Constructors
- ImageData(JSAny dataOrSw, int shOrSw, [JSAny settingsOrSh, ImageDataSettings settings])
-
factory
Properties
- colorSpace → PredefinedColorSpace
-
The read-only
ImageData.colorSpace
property is a string indicating the color space of the image data.no setter - data → JSUint8ClampedArray
-
The readonly
ImageData.data
property returns aUint8ClampedArray
that contains the ImageData object's pixel data. Data is stored as a one-dimensional array in the RGBA order, with integer values between0
and255
(inclusive).no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
The readonly
ImageData.height
property returns the number of rows in the ImageData object.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int
-
The readonly
ImageData.width
property returns the number of pixels per row in the ImageData object.no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited