Layer.getMaskPixel

Function/Meaning

Get the value of the mask image

Type
Layerclassmethod of
Syntax
getMaskPixel(x, y)
Arguments
x

Specifies the x coordinate (in the image coordinates of the layer) for which you want to get the value.

y

Specifies the y coordinate (in the image coordinates of the layer) for which you want to get the value.

Return value

Mask image value (0 to 255)

Explanation

Gets the value (0 to 255) at any position in the layer mask image (the image that retains opacity).
An exception is thrown if you specify an invalid (out of range) position as the image coordinates.