MIL_CONST_TEXT_PTR FileName, | //in |
MIL_ID BufId | //in |
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.
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:
For specifying the file name and
path
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_INTERACTIVE |
Opens the File Save As dialog box from which you can interactively specify the drive, directory, and name of the file. |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("FileName") 1 |
Specifies the drive, directory, and name of the file (for example, "C:\mydirectory\myfile"). (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Specifies the identifier of the data buffer to save. This image buffer can have an ROI set using MbufSetRegion().
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |