Name
CRC.createImageData() — creates a new ImageData object
Synopsis
ImageData createImageData(w,h) ImageData createImageData(ImageDatadata)
Arguments
w,hThe desired ImageData width and height, in CSS pixels
dataAn existing ImageData object that specifies the size of the ImageData to be created
Returns
A newly created ImageData object that has the specified width
and height or has the same size as
data.
Description
Returns a new ImageData object with the specified width and height
or the same dimensions as data. All pixels
within this new ImageData object
are initialized to transparent black (all color components and alpha are
0).
The w and h
arguments specify image dimensions in CSS pixels. Implementations are
allowed to map single CSS pixels to more than one underlying device
pixel. The width and height
properties of the returned ImageData object specify the image dimensions
in device pixels, and these values may not match the
w and h
arguments.
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access