IC Imaging Control C++

saveToFileTIFF Method

saveToFileTIFF Method

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

The buffer that is to be saved.

filename

Specifies the filename of the TIFF file.

pFilename

Specifies the filename of the TIFF file.

Return value:

This method returns an error object. If successful, it is set to eNOERROR. If the format of the image buffer can not be converted to TIFF, eINVALID_PARAM_VAL is returned. If the file can not be written, the error status is eWRITE_ERROR.

Remarks:

This method only supports image buffer formats Y800, Y16, RGB24 and RGB32.

Information:

Introduced in version 3.3

Sample:

The following sample shows how to snap an image and save it to a TIFF file.

if( m_Grabber.isLive())
{
    if( m_Grabber.snapImages())
    {
        DShowLib::saveToFileTIFF(*m_Grabber.getActiveMemBuffer(),"Testimage.tiff");
    }
}
See also: IFrame, MemBuffer, saveToFileBMP, saveToFileJPEG

<< Class Library Reference

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us