Layer.getMainPixel

Function/Meaning
Get the color of the main image
Type
Method of the Layer class
Syntax
getMainPixel(x, y)
Arguments
x Specifies the x-coordinate (in layer image coordinates) to get the color from.
y Specifies the y-coordinate (in layer image coordinates) to get the color from.
Return Value
Color number in 0xRRGGBB format
Description
Gets the color at an arbitrary position in the layer's main image (the image holding the color data).
An exception occurs if a position invalid for image coordinates (out of range) is specified.