DTwainAcquirer::EnableBlankPageDetection

Top  Previous  Next

Syntax

 

 
DTwainAcquirer &EnableBlankPageDetection(bool bEnable = true,

                                                                   double threshold = 98.5,

                                                          DTWainBlankPageModeType bp=BLANKPAGE_AUTODISCARD_AFTERPROCESS)

Parameters

bEnable

 

Enables detection and discarding of blank pages when acquired.  If bEnable is true, any blank pages detected by DTWAIN will be discarded according to the bpmode type.  If bEnable is false, then blank page detection is disabled.

 

The threshold parameter is a percentage value that denotes the ratio of white pixels to black pixels for DTWAIN to determine if a page is actually blank.

 

The bpMode parameter denotes whether blank pages will be automatically discarded when detected.  The value of bpMode can be one of the following:

 

BLANKPAGE_AUTODISCARD_NONE - Equivalent to DTWAIN_BP_AUTODISCARD_NONE.

BLANKPAGE_AUTODISCARD_IMMEDIATE - Equivalent to DTWAIN_BP_AUTODISCARD_IMMEDIATE.

BLANKPAGE_AUTODISCARD_AFTERPROCESS - Equivalent to DTWAIN_BP_AUTODISCARD_AFTERPROCESS

BLANKPAGE_AUTODISCARD_ANY - Combination of BLANKPAGE_AUTODISCARD_IMMEDIATE and BLANKPAGE_AUTODISCARD_AFTERPROCESS

 

For more information on these options, please see DTWAIN_SetBlankPageDetection.

 

Return Value

Returns reference to current DTwainAcquirer object (*this).