CopyPixAttribToArray

Declaration: TMetaData.CopyPixAttribToArray (AttribLayer: integer; var Dest: TInt2DArray): integer;
Copies the pixel attributes of the attribute layer AttribLayer to the two-dimensional integer array Dest which is automatically resized to match the size of the pixel attributes matrix (SizeX by SizeY).

If AttribLayer is set to zero, all four attribute layers are copied at once without further processing (raw data copy). If AttribLayer is greater than zero, the attributes of higher layers are automatically mapped into the range of 0 to 127.

The function returns the following error codes:

 0 ... everything OK
-1 ... the parameter AttribLayer is out of range

Hint: In order to directly access the metadata of the currently loaded dataset you can use the pre-declared global variable MData.