Canvas:newImageData
Generates ImageData from the contents of the Canvas.
data = Canvas:newImageData()
data ImageData The new ImageData made from the Canvas' contents.
data = Canvas:newImageData( slice, mipmap, x, y, width, height )
slice number The cubemap face index, array index, or depth layer for cubemap, array, or volume type Canvases, respectively. This argument is ignored for regular 2D canvases.
mipmap (1) number The mipmap index to use, for Canvases with mipmaps.
x number The x-axis of the top-left corner (in pixels) of the area within the Canvas to capture.
y number The y-axis of the top-left corner (in pixels) of the area within the Canvas to capture.
width number The width in pixels of the area within the Canvas to capture.
height number The height in pixels of the area within the Canvas to capture.
data ImageData The new ImageData made from the Canvas' contents.