Synopsis
Get data from a 2D area of a buffer and place it in a user-supplied array.
Format
void MbufGet2d(SrcBufId, OffX, OffY, SizeX, SizeY, UserArrayPtr)
MIL_ID SrcBufId; | Source buffer identifier |
long OffX; | X offset relative to source buffer origin |
long OffY; | Y offset relative to source buffer origin |
long SizeX; | Width of required data area |
long SizeY; | Height of required data area |
void *UserArrayPtr; | Destination user array |
Description
This function copies data from a specified two-dimensional area of a MIL source buffer to a user-supplied array.
Note, for multi-band buffers, this function linearly copies the data from the specified two-dimensional region of each band (RRR…GGG…BBB…).
The SrcBufId parameter specifies the identifier of the source buffer.
The OffX parameter specifies the horizontal offset (in pixels) of the required area, relative to the top-left corner pixel of the source buffer. The OffY parameter specifies the vertical offset.
The SizeX and SizeY parameters specify the width and height, respectively, of the required area of the source buffer.
The UserArrayPtr parameter specifies the address of the user array in which to copy the data from the source buffer. Ensure that the user array is large enough to accommodate the data to be copied. MbufGet2d?assumes that the array is of the same data type as the source buffer.
See also
MbufGet, MbufGet1d,MbufGetColor, MbufPut, MbufPut1d, MbufPut2d, MbufPutColor