Declaration: TMetaData.CopyPixAttribFromArray (AttribLayer: integer; Src: TInt2DArray): integer;
Copies two-dimensional integer array Src into the pixel attributes of the attribute layer specified by AttribLayer. Setting AttribLayer to zero causes all four layers to be copied at ones (raw copy).

The function returns the following error codes:

 0 ... everything OK
-1 ... the size of the Src array does not match the size of the pixel attributes array
-2 ... the parameter AttribLayer is out of range (valid range: 0..4)

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