Example-VB | Example-VC++ |
Sets various scanner options, based on values retrieved by the GetScanCapability method.
Ö | Imaging for Windows Professional Edition V1.0, V1.1, and V2.0 |
Imaging for Windows 95 and 98 | |
Imaging for Windows NT 4.0 |
Image Scan control
object.SetScanCapability Capability_ID,Capability_Value
Parameter | Data Type | Description |
Capability_ID | Integer | One of the scanner capabilities listed in the table below |
Capability_Value | Variant | Sets the following capability values |
Capability_ID Name |
Description | Capability Value | Data Type |
100 Image Type |
Sets the Image Type | One of the following values: 1 - black and white 2 - grayscale 16 4 - grayscale 256 8 - color 256 palletized 16 - true color 24-bit RGB 32 - color 16-bit palettized |
Integer |
101 X Resolution |
Sets the X Resolution. Use the Minimum Resolution, Maximum Resolution, and Resolution Step Capability Ids of the GetScanCapability method to get valid values. Note: This capability also sets the Y resolution, symmetric with the X resolution. If you wish to set X and Y resolutions independently, you must first set the X resolution, and then the Y resolution. |
A value between maximum and minimum resolution. | Long |
102 Brightness Mode |
Sets Brightness Mode to Normal or Automatic. If you set this value to 1 (Normal), you must also set a Brightness value. | One of the following values: 1 - Normal 2 - Automatic |
Integer |
103 Brightness |
Sets the brightness when Brightness mode is 1 (Normal). Use the Minimum Brightness, Maximum Brightness, and Brightness Step Capability Ids of the GetScanCapability method to obtain valid values. | A value between maximum and minimum brightness | Long |
104 Contrast Mode |
Sets Contrast Mode to Normal or Automatic. If you set this value to 1 (Normal), you must also set a Contrast value. | One of the following values: 1 - Normal 2 - Automatic |
Integer |
105 Contrast |
Sets the contrast when Contrast mode is 1 (Normal). Use the Minimum Contrast, Maximum Contrast, and Contrast Step Capability Ids of the GetScanCapability method to obtain valid values. | A value between maximum and minimum contrast. | Long |
106 Image Layout |
Sets four values (in inches) that define the image layout - Left, Top, Height, and Width. Use the Maximum Height and Maximum width capability Ids of the GetScanCapability method to obtain valid values. |
An array of 4 values (inches), set in the following order:
Left start of scan offset |
An array of Single values |
107 Scan Mode |
Sets the Scan Mode to Flatbed or ADF (Automatic Document Feeder). | One of the following values: 1 - Flatbed 2 - ADF |
Short |
109 Y Resolution |
Sets the Y Resolution. Use the Minimum Resolution, Maximum Resolution, and Resolution Step Capability Ids of the GetScanCapability method to get valid values. Note: This capability overrides the Y value set by the X Resolution Capability ID. If you wish to set X and Y resolutions independently, you must first set the X resolution, and then the Y resolution. |
A value between maximum and minimum resolution | Long |
Before you set a capability, you should call the GetScanCapability method.
The scanner must be open when this call is made, or an error is returned.
If a capability is not supported, a VT_Error is returned.