createImageData method

ImageData createImageData(
  1. JSAny imagedataOrSw, [
  2. int sh,
  3. ImageDataSettings settings
])

The CanvasRenderingContext2D.createImageData() method of the Canvas 2D API creates a new, blank ImageData object with the specified dimensions. All of the pixels in the new object are transparent black.

Implementation

external ImageData createImageData(
  JSAny imagedataOrSw, [
  int sh,
  ImageDataSettings settings,
]);