This method retrieves the possible setting values for a specified property of the scan device.

[Visual Basic] Public Function GetCapabilityEnumToSingle(ByVal capability As Newtone.ImageKit.ScanCapability) As Single()
[C#] public float[] GetCapabilityEnumToSingle(Newtone.ImageKit.ScanCapability capability);

Parameters

capability
The number for the retrieved capability (Values are of type ScanCapability 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).

Depending on your scanner, the resolution values that are possible may be different according to the pixel type value (i.e. according to whether the pixel type is 1 bit color, 24 bit color, etc.) Because of this, it is recommended that you 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 GetCapabilityEnumToSingle 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
FeederEnabled The possible values to enable feeder (0: document plate; 1: feeder)*1
Indicator The possible Indicator values *1
ThumbnailEnabled The possible values to enable thumbnails *1
DuplexEnabled The possible values to enable duplex scanning (0: single side; 1: duplex) *1
AutoBright The possible values for automatic brightness *1
Brightness The possible brightness setting values
Contrast The possible contrast setting values
Filter The possible filter setting values
Gamma The possible gamma setting values
Highlight The possible hightlight setting 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 setting values
XResolution The possible horizontal resolution setting values
YResolution The possible vertical resolution setting values
Rotation The possible totation setting values
PaperSize A member of type ScanPaperSize enumeration
Threshold The possible threshold setting values
XScaling The possible horizontal scaling setting values
YScaling The possible vertical scaling setting values
BitDepthReduction A member of type ScanBitDepthRedution enumeration
UndefinedImageSize The possible undefined image size values *1
ImageFilter A member of type ScanImageFilter enumeration
NoiseFilter A member of type ScanNoiseFilter enumeration
OverScan A member of type ScanOverScan enumeration
BorderDetection The possible BorderDetection values *1
Deskew The possible Deskew values *1
AutomaticRotate The possible AutomaticRotate values (including TWAIN standard values) *1
JpegQuality The possible Jpeg quality setting values
AutoSize The possible page size recognition setting values
AutomaticColorEnabled The possible values to enable automatic color *1
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
(1) For Epson Scan - 0: None, 1: Standard, 2: 85lpi (For Newspapers), 3: 133lpi (for Magazines and Catalogs), 4: 175lpi (for Photographs)

(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 - 0F None, 1: Weak 2: Normal (default), 3: Strong
(2)Panasonic Scan Drivers - 0: None, 1: Smooth, 2: Low, 3: Standard, 4: High

ExtendedUserInterface

This is enabled only for certain Epson scanners
0: Starts up the UserInterface that was last used, 1: Starts up the professional mode, 2: Starts up the automatic mode, 3: Starts up the home mode, 4: Starts up the automatic mode (with no error messages and supressed UserInterface), 5: Starts up office mode

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 theGetCapbilityRange method.

*1 For TWAIN 2.0 datasources and above the retrieved values will be all the possible settings. For ContainerType 3,4, and 6, the retrieved value will be the value of the current setting.

See Also

Scan Class | Scan Members


The ImageKit.NET3 is created by Newtone Corporation