Object function reference

get_pixel

A reference entry for get_pixel

Object function · Image

get_pixel(number x_coordinate, number y_coordinate, [boolean associative]) ⇒ list | map

Returns the red, green, blue and alpha channels for a pixel. By default the result is a four-element list; when associative is true, it is returned as a map with red, green, blue and alpha keys.