saveToFileBMP Method

This function saves the contents of an image buffer to a .BMP file.
Syntax:
Error saveToFileBMP( const IFrame& buf, const std::string& filename );
Error saveToFileBMP( const IFrame& buf, const std::wstring& filename );
Error saveToFileBMP( const IFrame& buf, const wchar_t* pFilename );
 
Error saveToFileBMP( const IFrame& buf, const std::string& filename, tColorformatEnum file_fmt );
Error saveToFileBMP( const IFrame& buf, const std::wstring& filename, tColorformatEnum file_fmt );
Error saveToFileBMP( const IFrame& buf, const wchar_t* pFilename, tColorformatEnum file_fmt );
Parameter Description
buf

The buffer that is to be saved.

filename

Specifies the filename of the .BMP file.

pFilename

Specifies the filename of the .BMP file.

file_fmt

Specifies the color format of the .BMP file.

Return value:

This method returns an error object. On success, it is set to eNOERROR. If the conversion fails, eINVALID_PARAM_VAL is returned.

Remarks:

This method saves the contents of the passed IFrame into a .BMP file. If no file_fmt parameter is given, the format of the bitmap file (BITMAPINFO) is specified by the IFrame. If file_fmt is set and it differs from the color format currently set in IFrame, the contents are converted on the fly. This conversion may take awhile.

Information:

Introduced in IC Imaging Control 2.0

See also: IFrame, saveToFileJPEG, tColorformatEnum

<< Class Library Reference

This site is part of The Imaging Source Network. Other sites include Company Portal, Image Processing, Astronomy Cameras, Astronomy Cameras Blog, Blog caméras d'astronomie, Astronomy Cameras Competition, TX Text Control, TX Text Control Blog and Forums.