AcquireMulti method (Twain Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

int AcquireMulti(AnsiString strBaseFileName, unsigned uFlags, unsigned uTransferMode, int nFormat, int nBitsPerPixel, L_BOOL bMultiPageFile, unsigned uUserBufSize, L_BOOL bUsePrefferedBuffer);

Delphi Syntax

Function AcquireMulti (strBaseFileName: String; uFlags: L_UINT; uTransferMode: L_UINT; nFormat: L_INT; nBitsPerPixel: L_INT; bMultiPageFile: L_BOOL; uUserBufSize: L_UINT32; bUsePrefferedBuffer: L_BOOL ): L_INT;

Overview

Refer to How to Acquire from the Twain Source.

Remarks

(Document/Medical only) Acquires one or more images from a TWAIN source and stores the images in the specified file(s).

Based on the scanner type, this method will determine the best/fastest scanning method to use. This method will be used when actually scanning the image(s). Before calling this method you can call FindFastConfig to determine the best scan configuration and then pass the scan configuration information to the AcquireMulti method. If you do not call FindFastConfig before calling AcquireMulti, then the AcquireMulti method will determine the best scanning method.

If the file format specified in nFormat does not support multi-page files, this method will ignore the bMultiPageFile parameter and automatically save the scanned images in separate files. The naming of the files will be carried out as follows: if the string in strBaseFileName is "Temp.jpg", the method will append the number of the image, 0001, 0002, etc, to the name of the file. Therefore, the output file names will be "Temp0001.jpg", "Temp0002.jpg", etc.

If the file format specified in nFormat supports multi-page files, this method will use the bMultiPageFile parameter to determine how to save multiple images. If bMultiPageFile is FALSE, each scanned page will be saved to a separate file, named in the same manner described in the paragraph above. If bMultiPageFile is TRUE, the name of the output file will be exactly the string in strBaseFileName (Temp.jpg) and it will be saved as a multi-page file.

If uTransferMode is LTWAIN_BUFFER_MODE, and bUsePreferredBuffer is FALSE, then the method will use the user-defined buffer size in uUserBufSize. If however bUsePreferredBuffer is TRUE, then the method will use the Twain driver preferred buffer size and will ignore uUserBufSize.

See Also

Elements:

Acquire method, InitSession method, EndSession method, OpenTemplateFile method, CloseTemplateFile method, ShowTemplateDlg method, AddCapabilityToFile method, GetNumOfCapsInFile method, GetCapabilityFromFile method, FindFastConfig method, GetScanConfigs method, FreeScanConfig method.

Topics:

TWAIN Functionality: Images.