Declaration: CopyBitPlaneToPixelMask(PixArray: TInt2DArray; BitPlane, MaskIx: integer): integer;
Copies a bit plane of the integer array PixArray to the collection of pixel masks. The parameter BitPlane specifies the bit plane to be copied, the parameter MaskIx defines the mask. The valid range of both parameters is 1 to 32, the LSB (least significant bit) is addressed by 1, the MSB (most significant bit) by 32.

The function returns the following error codes:

 0 .... everything OK
-1 ... the size of PixArray does not match the size of the pixel matrix
-2 ... BitPlane and/or MaskIx are out of range (valid range is 1..32)

Last Update: 2016-Dez-02