DTwainBufferedTransfer::GetDataBuffer

Top  Previous  Next

Syntax

 

std::string& DTwainBufferedTransfer::GetDataBuffer( );

 

Return Value

Returns a std::string that represents the acquired data.

 

 

Comments

 

 

Returns the image data that has currently been acquired during buffered transfer mode.  For each strip that is acquired in the buffered transfer mode, the image data for the strip is appended to an internal buffer represented by a std::string variable.

 

Note that GetData( ) returns a modifiable std::string reference to the image data, meaning that the data returned can be modified by the caller, and the modifications will be part of the image data.  This is useful if the image data needs to have header information placed in front of the actual raw data that has been acquired (TIFF and BMP buffered acquistions only acquire the raw image data -- the application is responsible for applying the TIFF or BMP headers to the raw data).

 

To retrieve the image data from the std::string, the std::string::data( ) function should be used.  To get the length of the data, std::string::length( ) is used.  See Example 7 for usage of GetData( )