Sign In

$getPixels[]

Returns an array of pixels (their colors)

v1.0.0+ Requires Brackets

Usage

$getPixels[;;;;;]
Also callable as
$getImageData

Arguments

NameTypeRequiredDescription
canvas
StringNoName of the canvas
x
NumberYesThe X coordinate of the top-left corner of the rectangle from which the pixel colors will be extracted
y
NumberYesThe Y coordinate of the top-left corner of the rectangle from which the pixel colors will be extracted
width
NumberYesThe width of the rectangle from which the pixel colors will be extracted
height
NumberYesThe height of the rectangle from which the pixel colors will be extracted
type
NoThe pixels (image data) content type

Was this page helpful?