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

[Visual Basic]   [ Long = ]imagekitcontrolname.Scan.GetCapEnum(CapNo As ScanCapabilityConstants, ConType As Integer, List As Single, CurrentIndex As Long, DefaultIndex As Long, ListNum As Long)
[Visual C++]     [ long = ]imagekitcontrolname.GetScan().GetCapEnum(long CapNo, short *ConType, float *List, long *CurrentIndex, long *DefaultIndex, long ListNum)
[VB.NET]   [ Integer = ]imagekitcontrolname.Scan.GetCapEnum(CapNo As ImageKit9(A)Lib.ScanCapabilityConstants, ByRef ConType As Short, ByRef List As Single, ByRef CurrentIndex As Integer, ByRef DefaultIndex As Integer, ListNum As Integer)
[C#.NET]   [ int = ]imagekitcontrolname.Scan.GetCapEnum(ImageKit9(A)Lib.ScanCapabilityConstants CapNo, ref short ConType, ref float List, ref int CurrentIndex, ref int DefaultIndex, int ListNum)

Parameters

Name Explanation
CapNo The number for the retrieved property (in hexidecimal)

   0x0100   Compression method

   0x0101   Pixel type

   0x0102   Scan units of measurement

   0x0103   Method of transfer

   0x1101   Brightness

   0x1103   Contrast

   0x1108   Gamma

   0x1109   Halftone

   0x110a   Highlight

   0x110c   File Format

   0x110e   Dropout color

   0x1110   Paper orientation

   0x1113   Shadow

   0x1118   Horizontal resolution

   0x1119   Vertical resolution

   0x1121   Rotation angle

   0x1122   Paper size

   0x1123   Threshold

   0x1124   Horizontal scaling

   0x1125   Vertical scaling

   0x112c   Method of color reduction

   0x1147   Image filter

   0x1148   Noise filter

   0x1149   OverScan

   0x1153   JPEG quality coefficient

   0x115c   Double sided merge

   0xf001   Scanning speed

   0xf002   Moire filter

   0xf004   Sharpness

   0xf006   Extended UiMode

   0xf007   Dynamic threshold

   0xf00b   Skip blank page

   0xf00e   Text enhancement

   0xf00f   Border

In Visual Basic and .NET, replace 0x with &H.

 

The following constants can be used: (ikScanCompression = 0x0100, ikScanPixelType = 0x0101, ikScanUnits = 0x0102, ikScanTransferMode = 0x0103, ikScanFeederEnabled = 0x1002, ikScanFeederLoaded = 0x1003, ikScanIndicator = 0x100b, ikScanUiControllable = 0x100e, ikScanDeviceonline = 0x100f, ikScanThumbnailsEnabled = 0x1011, ikScanDuplex = 0x1012, ikScanEnableDSUIOnly = 0x1014, ikScanCustomDSData = 0x1015, ikScanBrightness = 0x1101, ikScanContrast = 0x1103, ikScanGamma = 0x1108, ikScanHalfTone = 0x1109, ikScanHighlight = 0x110a, ikFileScanFormat = 0x110c, ikScanDropoutColor = 0x110e, ikScanOrientation = 0x1110, ikScanShadow = 0x1113, ikScanXResolution = 0x1118, ikScanYResolution = 0x1119, ikScanRotation = 0x1121, ikScanPaperSize = 0x1122, ikScanThreshold = 0x1123, ikScanXScaling = 0x1124, ikScanYScaling = 0x1125, ikScanBitDepthReduction = 0x112c, ikScanUndefinedImagesize = 0x112d, ikScanImageDataset = 0x112e, ikScanImageFilter = 0x1147, ikScanNoiseFilter = 0x1148, ikScanOverScan = 0x1149, ikScanBorderDetection = 0x1150, ikScanDeskew = 0x1151, ikScanJpegQuality = 0x1153, ikScanImageMerge = 0x115c, ikScanScanningSpeed = 0xf001, ikScanMoirefilter = 0xf002, ikScanMoirefilterMaxResolution = 0xf003, ikScanSharpness = 0xf004, ikScanRotateBack = 0xf005, ikScanExtUiMode = 0xf006, ikScanDynamicThreshold = 0xf007, ikScanPixelAutomationCap = 0xf008, ikScanMultiStream = 0xf009, ikScanTextOrientationRecognition = 0xf00a, ikScanSkipBlankPage = 0xf00b, ikScanRemoveHole = 0xf00c, ikScanFocusPosition = 0xf00d, ikScanTextEnhancement = 0xf00e, ikScanBorder = 0xf00f).

ConType A variable that contains the type of the retrieved property value (see below)
List An array containing the retrieved values (Use when CapNo refers to properies other than halftone)
CurrentIndex

The index referring to the current value of the List (the index starts from 0)

List[CurrentIndex] = current value

DefaultIndex The index referring to the default value of the List (the index starts from 0)

List[DefaultIndex] = default value

ListNum The number of elements in the List array
* NOTE for retrieving array values:
In Visual Basic, if the array is defined as Dim List(0 To 3) As Single, then the arguments are returned in List(0).
In Visual C++, pass the pointer to the first element in the array.
In VB.NET, the arguments are returned in List(0).
In C#.NET, the arguments are returned in List[0].

Return Value

When the CapNo refers to halftone
Returns the retrieved number of halftone.
When the CapNo refers to settings other than halftone
If ConType=3 or 4, then the number is retrieved
If ConType=5 then 1 is returned, if ConType=6 then 5 is returned (these are constants).
If List is NULL or ListNum is 0 then the number of elements in the appropriate array are returned.

If 0 is returned then there was an error. Please refer to the error status.

Explanation

The GetCapEnum 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 DsName property. If the DsName property is blank then please execute the Select method prior to executing the GetCapEnum method. (Note: If the OpenDS method is executed prior to the GetCapEnum method the the DsName property is disabled and the open datasource is used). If the CapNo refers to halftone, then the List array is not used, however you must pass a dummy array or set NULL(Visual C++) or Nothing(VB.NET) into the List parameter. ListNum is also not used in this case so please set it to 0.

Depending on the scanner being used, it is possible that the range acceptable resolution values will differ according to the pixel type setting (1 bit color or 24 bit color). Also, depending on the type of transfer mode used (memory or file), the type of compression values possible may differ. Because of this, before retreiving the range of possible XDpi and YDpi values, you should first set the PixelType property and before retrieving the possible compression values, you should first set the TransferMode property.

To execute the GetCapEnum method you must first execute the Initialize method. If the OpenDS method is executed prior to executing the GetCapEnum method then the open datasource cannot be used by another application until that datasource (scan device) is closed.

For scripting languages and other programs that require variant types, please refer to the GetCapEnumVariant method.

The GetCapEnum method corresponds to the Scan Control's ScanGetCapEnum method in earlier versions of the ImageKit.

 

Regarding ConType values

(0: When False (0) is returned, 3: when an array is returned, 4 when a list is returned, 5: when a single value is returned, 6: when a range is returned)

When CapNo refers to HalfTone
If ConType=3, then the HalfToneList property value is set and CurrentIndex and DefaultIndex are disabled.
If ConType=4, then the HalfToneList property value is set.
If ConType=5, then the HalfToneList property value is set to the current value.
If ConType=6, then no halftone is available
When CapNo refers to something other than HalfTone
If ConType=3, then the values of the List array are set and CurrentIndex and DefaultIndex are disabled.
If ConType=4, then the values of the List array are set.
If ConType=5, then the current value is set in the first element, List[0], of the List array.
If ConType=6, then minimum value is set in the first element, List[0], of the List array; the maximum value is set in the second element, List[1], the step value is set in the third element, List[2], the default value is set in the fourth element, List[3], and the current value is set in the fifth element, List[4].

Regarding the values set into the List array

When CapNo refers to the compression method:
0: uncompressed, 1: PACKBITS, 2: GROUP3-1D, 3: GROUP3-1DEOL, 4: GROUP3-2D, 5: GROUP4, 6: JPEG, 7: LZW, 8: JBIG, 9:PNG, 10: RLE4, 11: RLE8, 12: BITFIELDS (2, 3, 4, 5 are FAX[CCITT], 10, 11, and 12 are BMP)
When CapNo refers to PixelType:
0: Black and White - (2 bits), 1: Grayscale, 2: RGB color, 3: Palette color
(Depending on the datasource, values can also range from 4 to 8)
When CapNo refers to Scan Units:
0: Inches, 1: Centimeters, 2: Pica, 3: Points, 4: Twips, 5: Pixels, 6: Millimeters
When CapNo refers to the method of transfer:
0: Native, 1: File, 2: Memory, 3: File2
When CapNo refers to the file format:
0: TIFF, 1: PICT, 2: BMP, 3: XBM, 4: JFIF(JPEG), 5: FPX, 6: TIFF MULTI, 7: PNG, 8: SPIFF, 9: EXIF, 10: PDF, 11: JP2 (JPEG2000 Part1), 13: JPX(JPEG2000 Part2), 14: DEJAVU, 15: PDF/A(Version1), 16: PDF/A(Version2)
When CapNo refers to the Dropout color:
0: Red, 1: Green, 2: Blue, 3:None, 4: White
(Depending on the datasource, values 5,6 can be set)
When CapNo refers to the orientation of the paper:
0: 0 degrees (Portrait), 1: 90 degrees, 2: 180 degrees, 3: 270 degrees (Landscape)
When CapNo refers to paper size:
0: User defined size, 1: A4, 2: JIS B5, 3: US letter, 4: US legal, 5: A5, 6: ISO B4, 7: ISO B6, 9: US ledger, 10: US executive, 11: A3, 12: ISO B3, 13: A6, 14: C4, 15: C5, 16: C6, 17: 4A0, 18: 2A0, 19: A0, 20: A1, 21: A2, 22: A7, 23: A8, 24: A9, 25: A10, 26: ISO B0, 27: ISO B1, 28: ISO B2, 29: ISO B5, 30: ISO B7, 31: ISO B8, 32: ISO B9, 33: ISO B10, 34: JIS B0, 35: JIS B1, 36: JIS B2, 37: JIS B3, 38: JIS B4, 39: JIS B6, 40: JIS B7, 41: JIS B8, 42: JIS B9, 43: JIS B10, 44: C0, 45: C1, 46: C2, 47: C3, 48: C7, 49: C8, 50: C9, 51: C10, 52: US statement, 53: Business card, 54: Maximum size, 1000 Undefined
When CapNo refers to reduction of color depth:
0: Threshold, 1: HalfTone, 2: Custom HalfTone, 3: Diffusion , 4: Dynamic Threshold
When CapNo refers to the noise filter:
0: None, 1: Automation, 2: LOWPASS, 3: BANDPASS, 4: HIGHPASS
When CapNo refers to the image filter:
0: None, 1: Automation, 2: LONEPIXEL, 3: MAJORITYRULE
When CapNo refers to the OverScan:
0: Uses the set scan size to scan, 1: Considers the scan size setting and automatically scans, 2: Uses the scan size setting as a base then increases the top and bottom dimensions to scan, 3: Uses the scan size setting as a base then increases the left and right dimensions to scan, 4: Uses the scan size setting as a base then increases the top, bottom, left, and right dimensions to scan
When CapNo refers to the scanning speed:
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
When CapNo refers to the moire filter:
This is enabled only for certain Epson scanners, Canon DR scanners, and PFU Scanners.
(1) Epson Scan Drivers - 0: None, 1: Standard, 2: 85lpi (For Newspapers), 3: 133lpi (for Magazines and Catalogs), 4: 175lpi (for Photographs)
(2) Canon DR Scan Drivers - 1: None, 2: High Speed Scanning, 3: High Quality Scanning
(3) PFU Scan Drivers - 0: None, 1: Moire Filter level1, 2: Moire Filter level2, 3: Moire Filter level3, 4: Moire Filter level4
When CapNo refers to Sharpness:
This is enabled only for certain Canon DR scanners, Epson scanners, Panasonic scanners, and PFU scanners.
For Canon DR scanners it is known as "edge enhancement", for Epson scanners it is known as "unsharp mask", for Panasonic scanners it is known as "image quality", and for PFU scanners, it is know as "outline enhancement".
(1) Canon DR Scan Drivers - From 1 to 5
(2) Epson Scan Drivers - 0: None, 1: Small, 2: Medium (default), 3: Large
(3) Panasonic Scan Drivers - 0: None, 1: Smooth, 2: Low, 3: Standard, 4: High
(4) PFU Scan Drivers - 0: None (Default), 1: Weak outline enhancement, 2: Medium outline enhancement, 3: Strong outline enhancement
When CapNo refers to the Extended UiMode:
This is enabled only for certain Epson scanners
0: Starts up the UI mode 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 UI), 5: Starts up office mode
When CapNo refers to the dynamic threshold:
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 CapNo refers to the text enhancement:
This is enabled only for certain Canon DR scanners and certain Epson scanners
(1) Canon DR scanner:
0: Text enhancement is not used (default), 1: Text enhancement is used, 2: Advanced text enhancement is used, 3: High speed text enhancement is used, 4,5: Advanced text enhancement II is used. (Value depends on the functions used)
(2) Epson scanners:
0: Character distinction is not used. (default), 1: Standard character distinction is used, 2: Strong character distinction is used

When CapNo refers to Brightness, Contrast, Gamma, Highlight, Shadow, XResolution, YResolution, Rotation angle, Threshold, XScaling, YScaling, and JPEG quality coefficient, SkipBlankPage then the value returned will be the possible setting value for that property.

Note: when ConType=6, the result will be the same as that returned from the GetCapRange(GetCapRangeVariant).


Regarding the string value set in the HalfToneList property
When CapNo refers to HalfTone, the name of the HalfTone is set.
When there is only one name "XXX,"
When there is more than one name "XXX,YYY, , "
XXX and YYY represent the name of the HalfTone, the name are separated by a comma with a comma at the end.

 

[Differences from the ImageKit7 ActiveX]
Rotation, OverScan, SkipBlankPage, and TextEnhancement values have been added to CapNo

 

The ImageKit9 ActiveX is a product created by Newtone Corporation