| MIL 10 Reference
| Customize Help
| Save Settings

MbufSave



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Save a data buffer in a file, using the MIL output file format.
Syntax
void MbufSave(
MIL_CONST_TEXT_PTR FileName, //in
MIL_ID BufId //in
)
Description

This function saves a previously allocated data buffer to a file, in the MIL file format. This is a baseline TIFF 6.0 file format with extra information included in the comment field. The extra information includes the buffer attributes and data type.

The MIL file format supports images that are binary, grayscale, and RGB, as well as palette-color images. Images in a different format are internally converted before being saved. In addition, by default, most color image buffers are saved in a packed (chunky) format (in accordance with baseline TIFF 6.0 specifications). Color binary buffers are saved in a 1-bit per pixel format (data is stored in a 3-band, packed binary format).

When saving an image buffer (M_IMAGE), all the pixel information is stored in the file. In addition, if the image buffer includes any region of interest (ROI) information, set using MbufSetRegion(), the ROI information is also stored in the file.

When saving an image buffer (M_IMAGE) that has an associated LUT buffer (color palette), the content of the LUT is also saved with the image.

Note, you can perform the same operation as MbufSave(), using MbufExport() with its FileFormat parameter set to M_MIL.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
FileName

Specifies the name and path of the file in which to save the model. It is recommended that you use the MIM file extension for easier use with other Matrox Imaging software products. The function handles (internally) the opening and closing of the file. If the file already exists, it will be overwritten.

This parameter can be set to one of the following values:

function map For specifying the file name and path
CollapseValue Description
Collapse M_INTERACTIVE

Opens the File Save As dialog box from which you can interactively specify the drive, directory, and name of the file.

Collapse MIL_TEXT("FileName") 1

Specifies the drive, directory, and name of the file (for example, "C:\mydirectory\myfile").

To specify a file on a remote computer (under Distributed MIL), prefix the specified file name string with "remote:///" (for example, "remote:///C:\mydirectory\myfile").

(summarize)

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

BufId

Specifies the identifier of the data buffer to save. This image buffer can have an ROI set using MbufSetRegion().

Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
INTERACTIVE