This method retrieves the possible setting values for a specified property of the scan device.
Parameters
capability
The number for the retrieved
capability (Values are of typeScanCapability enumeration)
Return Value
An array of supported values (Returns null [C#] or Nothing [Visual Basic] if unsuccessful).
Explanation
The GetCapabilityEnumToSingle method retrieves the possible setting values for a specified property of the scan device. To retrieve the possible setting values for a property it is first necessary to set the DataSourceName property. If the DataSourceName property is blank then please execute the SelectDataSource method prior to executing the GetCapabilityEnumToSingle method. (Note: If the OpenDataSource method is executed prior to the GetCapabilityEnumToSingle method the the DataSourceName is disabled and the open datasource is used).
Although it may vary depending on the scanner you are using, there are cases where the possible resolution values that you retrieve from your scanner may depend upon the values set in the PixelType property (i.e. black & white, 24 bit color, etc.). Because of this, it is recommended that you set the PixelType property prior to retrieving the possible values for horizontal and vertical resolution. Likewise, depending on the type of transfer method that has been set (memory transfer or native transfer) the compression methods that are possible for a given scanner may be different. You should therefore set the Transfer property value prior to retrieving the possible compression methods.
To execute the GetCapEnum method you must first execute the Initialize method. If the OpenDataSource method is executed prior to executing the GetCapabilityEnumToSingle method then the open datasource cannot be used by another application until that datasource (scan device) is closed.
After executing the GetCapabilityEnumToSingle method, the values are set into the ContainerType, CurrentIndex, and DefaultIndex properties.
Content of the Returned Value
Parameter | Return Value |
---|---|
Compression | A member of type ScanCompression enumeration |
PixelType | A member of type ScanPixelType enumeration |
Unit | A member of type ScanUnit enumeration |
Transfer | A member of type ScanTransfer enumeration |
Brightness | The possible brightness values |
Contrast | The possible contrast values |
Gamma | The possible gamma values |
Highlight | The possible highlight values |
ImageFileFormat | A member of type ScanFileFormat enumeration |
DropoutColor | A member of type ScanDropoutColor enumeration |
Orientation | A member of type ScanOrientation enumeration |
Shadow | The possible shadow values |
XResolution | The possible horizontal resolution values |
YResolution | The possible vertical resolution values |
Rotation | The possible degrees of rotation |
PaperSize | A member of type ScanPaperSize enumeration |
Threshold | The possible threshold values |
XScaling | The possible horizontal scaling values |
YScaling | The possible vertical scaling values |
BitDepthRedution | A member of type ScanBitDepthReduction enumeration |
ImageFilter | A member of type ScanImageFilter enumeration |
NoiseFilter | A member of type ScanNoiseFilter enumeration |
JpegQuality | The possible JpegQuality values |
ScanningSpeed | This is enabled only for certain Epson and Panasonic
scanners (1) Epson Scan Drivers - 0: For Quality, 1: For Speed (2) Panasonic Scan Drivers - 0: Slow, 1: Normal, 2: Fast |
MoireFilter |
This is enabled only for certain Epson and Canon
DR scanners (2) For Canon DR - 1: None, 2: High Speed, 3: High Quality |
Sharpness | This is enabled only for certain Epson and Panasonic
scanners For Epson scanners, the "unsharp mask" is used and for Panasonic scanners "image quality" is used. (1)Epson Scan Drivers - 0F None, 1: Weak 2: Normal
(default), 3: Strong |
ExtendedUserInterface |
This is enabled only for certain Epson scanners |
DynamicThreshold | This is enabled only for certain Panasonic scanners 0: None, 1: Bright, 2: A little brighter, 3: Standard, 4: A little darker, 5: Dark |
When ContainerType = 3, the value is returned but the
CurrentIndex and DefaultIndex are not enabled.
When ContainerType = 4, the value is returned and the array index
referring to the CurrentIndex and DefaultIndex contain the current
and default values.
When ContainerType = 5, the array index 0 contains the current
value (default value)
When ContainerType = 6, the array index 0 contains the minimum
value, the index 1 contains the maximum value, the index 2 contains
the step value, the index 3 contains the default value, the index 4
contains the current value which can be various different values.
This is the same result as executing the GetCapabilityRange method.