EZTwainX Scan sub-object
The EZTwainX.Scan sub-object offers specialized scanning properties and methods. Scan objects cannot be created, they can only be accessed as part of an EZTwainX control, using the Scan property of the control - for example,
EZTwain.Scan.PixelType = EZTwain.PT_BW
EZTwain.Scan.DPI = 200
Scan Object | ||||
---|---|---|---|---|
Properties | ||||
AutoNegate | bool | Automatically negate any image that is 'too black'. Default=true. | 1.57 | |
BitDepth | long | ICAP_BITDEPTH - not usually needed: defaults correctly based on PixelType. | 1.71 | |
Brightness | double | ICAP_BRIGHTNESS - Scanning brightness adjustment (-1000 to +1000) | 1.64 | |
Contrast | double | ICAP_CONTRAST - Scanning contrast adjustment (-1000..+1000) | 1.64 | |
DiscardBlankPages | bool | If true, discard blank pages (using EZTwainX.BlankPageThreshold as threshold) | 1.71 | |
Deskew | bool | If true, automatically deskew each scanned image | 1.71 | |
DPI | long | ICAP_XRESOLUTION/ICAP_YRESOLUTION - Resolution in dots-per-inch. | 1.57 | |
Duplex | long | 0=simplex scanning, 1=duplex, -1=don't care. Default=-1. |
1.57 | |
Feeder | long | 0=scan from platen, 1=from feeder, -1=don't care. Default=-1. | 1.57 | |
Gamma | double | ICAP_GAMMA (so-called gamma value for scanning) | 1.66 | |
PaperSize | PaperSize | Default=PS_ANY (no preference) | 1.57 | |
PixelType | PixelType | ICAP_PIXELTYPE - Default=PT_NONE (no preference) | 1.57 | |
PreviousTwainState | long | Value of TwainState (below) before the last state change. | 1.81 | |
SourceDevice | string | Name of device to use. | 1.57 | |
StopOnEmpty | bool | false (default): After all pages in an ADF have been scanned, the scanner's UI remains visible, allowing the user to re-load the ADF and resume scanning. true: After all pages in an ADF have been scanned, the scanner's UI is automatically closed. This property has no effect when the scanner's UI is hidden i.e. UseUI=false. |
1.73 | |
Threshold | long | Threshold (0..255) between black and white, for B&W scans | 1.66 | |
TwainState | long | State (1..7) of the TWAIN conversation - see TWAIN standard for details. | 1.73 | |
UseUI | bool | Display the scanner's user interface during scanning. Default=true. | 1.57 | |
XferMech | long | ICAP_XFERMECH - TWAIN transfer mechanism, see TWAIN specification. | 1.72 | |
Methods | ||||
Close() | Close the currently open device, if any | 1.57 | ||
IsFeederLoaded() => bool | Query the current device, return true if there is paper in the feeder. | 1.57 | ||
Open(string S) | Set SourceDevice = S and open it. | 1.66 | ||
OpenSourceDevice() | Open the scanner named by SourceDevice property (above) | 1.66 | ||
ResetRegion() | Reset (clear) the region-of-interest as set with SetRegion | 1.66 | ||
SetRegion(double x,y,w,h) | Set the scanning region-of-interest i.e. sub-rectangle to be scanned | 1.68 | ||