DTWAIN_SetBlankPageDetectionString

Top  Previous  Next

The DTWAIN_SetBlankPageDetectionString function allows detection of blank pages when acquiring from a TWAIN device, and optionally allows automatic discarding of blank pages.

 

DTWAIN_BOOL DTWAIN_SetBlankPageDetectionString (

DTWAIN_SOURCE

Source,

LPCTSTR

threshold,

LONG

options,

DTWAIN_BOOL

bEnable );

 

Parameters

Source

A DTWAIN_SOURCE denoting a TWAIN Source.

 

threshold

Sets the percentage of white pixels to black pixels to determine if a page is blank.

 

options

Sets the auto-discard options when processing blank pages.

 

bEnable

Enables/disables the blank page processing mechanism.

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_SetBlankPageDetectionString function works exactly the same way as DTWAIN_SetBlankPageDetection, with the exception of the LPCTSTR parameters, which are strings that denote the values to use.  

 

For example:

DTWAIN_SetBlankPageDetectionString( Source, "98.5", DTWAIN_BP_AUTODISCARD_ANY, TRUE)

 

TWAIN State Transitions

None

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

DTWAIN Source Selection Function

 

See Also

Blank Page Detection