ImageGear for C and C++ on Windows v19.1 - Updated
IG_TWAIN_preview
API Reference Guide > TWAIN Component API Reference > TWAIN Component Functions Reference > Scanning Functions > IG_TWAIN_preview

This function acquires camera preview images from the selected TWAIN device.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_TWAIN_preview(
        LPFNIG_TWAIN_AFTER_PAGE lpfnAfterPage,
        LPVOID lpAfterPageData,
        AT_BOOL bShowUI
);

Arguments:

Name Type Description
lpfnAfterPage LPFNIG_TWAIN_AFTER_PAGE Far pointer to a callback function that will be called after each page is acquired.
lpAfterPageData LPVOID Optional pointer from which to pass and receive data. Set to NULL if you don't need to do this.
bShowUI AT_BOOL This flag determines whether or not the user interface is shown. Set to TRUE if you want Data Source to display preview user interface.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

Depends on the scanner driver.

Remarks:

An example use is to retrieve previews of images stored within a digital camera. The function uses lpfnAfterPage callback function to deliver the acquired images.

Use IG_TWAIN_source_open() to select the desired Data Source, and IG_TWAIN_cap_set() to set desired capabilities values, prior to calling this function.