| Customize Help

Specifying the dimensions of a data buffer



Data buffers can have up to three dimensions: an X, Y, and color band dimension. Most data buffers have an X dimension (for example, LUT buffers) or an X and Y dimension (for example, monochrome image buffers). The color-band dimension has been provided to allow you to store data for each color component used to represent an image; when allocating color buffers, each band will be of the same data depth and type.

Once you finish using a data buffer, you should release its memory space, using MbufFree().

Certain MIL functions support manipulating multi-band image buffers. For details on handling color image buffers, see the Dealing with color section of Chapter 2: Building an application.

Specifying the dimensions of a multi-frame image buffer

A multi-frame image buffer is one in which you plan on storing multiple sequential frames in vertically adjacent locations in the buffer. Multi-frame image buffers are used when grabbing images with a digitizer that supports frame burst technology. To work with a multi-frame image buffer, allocate the image buffer with a height that is the product of the Y-size of each individual frame and the number of frames that will be grabbed into the buffer on each grab command.