imaqWriteBMPFile
Usage
int imaqWriteBMPFile(const Image* image, const char* fileName, int compress, const RGBValue* colorTable);
Purpose
Writes an image to a BMP file. The function also stores a CalibrationUnit of IMAQ_METER only. If you pass an image to this function that has a CalibrationUnit other than IMAQ_METER, the function converts xStep and yStep from the supplied unit into meters.
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB
Parameters
Name
|
Type
|
Description
|
---|---|---|
image | const Image* | The image to write to a file. |
fileName | const char* | The name of the file to write. This parameter is required and cannot be NULL. |
compress | int | Set this parameter to TRUE to compress the BMP. Set this parameter to FALSE to write an uncompressed BMP. |
colorTable | const RGBValue* | An optional color table to associate with 8-bit images. If you want to provide a color table, the table must have 256 elements. Set this parameter to NULL to write a grayscale palette to the file. |
Return Value
Type |
Description |
---|---|
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). |