CopyPixelMaskToArray

Declaration: CopyPixelMaskToArray(var PixArray: TInt2DArray; TransferMask: integer): integer;
Copies parts of the collection of pixel masks to the array PixArray. The integer array PixArray is interpreted as 32 masks, each mask being represented by a particular bit of the integer cell values. Which pixel masks are affected is controlled by the parameter TransferMask. All bits of TransferMask which are set to 1 cause the corresponding pixel mask to be copied to PixArray.

For example, the statement CopyPixelMaskToArray (AnArray, $00000012); copies the pixel masks 2 and 5 to the integer array AnArray because the TransferMask parameter has the second and the fifth bit set to 1 ($00000012 = ...0000000000010010).

The function returns the following error codes:

 0 .... everything OK
-1 ... the size of PixArray does not match the size of the pixel matrix


Last Update: 2016-Dez-01