TWAIN Programming Guide

Capability Reference


The reference mentions additional information to TWAIN specification. Please refer to TWAIN specification sheet also.

CAP_AUTOFEED

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

If TRUE, document is fed automatically in Auto Document Feeder or Multi Photo Feeder. Before setting CAP_AUTOFEED, set CAP_FEEDENABLED to TRUE first. Note:
The Epson scanner Auto Document Feeder always feeds document automatically. When Auto document feeder is used, CAP_AUTOFEED is required to be set TRUE. In Multi Photo Feeder, automatic feeding can be controlled with this capability. If automatic feeding is disabled, control feeding and ejecting photo individually can be used with CAP_FEEDPAGE and CAP_CLEARPAGE.

CAP_AUTOMATICSENSEMEDIUM

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

If TRUE, data source scanning image from ADF when paper is on the ADF, scanning image from flatbed when paper is not on the ADF. If FALSE, data source use the setting of CAP_FEEDERENABLED. If CAP_FEEDERENABLED or CAP_DUPLEXENABLED is set, CAP_AUTOMATICSENSEMEDIUM is set to FALSE automatically. Note:
If this capability is set to TRUE, data source checks the status of CAP_FEEDERLOADED and return TRUE or FALSE to CAP_FEEDERENABLED dinamically.

CAP_AUTOSCAN

[Value Type(s)] TW_BOOL
[Default Value] FALSE (until Ver. 3.63)
TRUE (Ver. 3.64 of after)
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Application can set pre-scanning of scanner. This capability is supported only on Ver3.6. If TRUE is set, scanner scans images continuously even scanner doesn’t receive IMAGEXXXXFER Before setting CAP_AUTOFEED, set CAP_FEEDENABLED to TRUE first. If FALSE is set, scanner scans only 1 paper and wait until next papers IMAGEXXXXFER. (Epson Scan Ver5.0 or later)
If pre-scanning is enabled by CAP_AUTOSCAN and the number of sheet is specified byCAP_XFERCOUNT, then data source performs pre-scanning until specified number. If the value of CAP_XFERCOUNT is -1, scanning is performed for all sheets in ADF. Note:
Application needs to set this capability to FALSE when preview scanning. Application can set either TRUE or FALSE for main scanning but scanning speed might be slow when FALSE is set because paper feeding starts after IMAGEXXXXFER is sent.

CAP_CLEARPAGE

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] N/A
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_SET

[Description]

If TRUE, the Source will eject the current page being acquired from and will leave the feeder acquire area empty. This capability is available for Multi Photo Feeder only. Before setting CAP_FEEDPAGE, set CAP_FEEDENABLED to TRUE first. And then set CAP_AUTOFEED to FALSE. Note:
The Epson scanner Auto Document Feeder always feeds document automatically. This capability is invalid for Auto document feeder.  

CAP_CUSTOMDSDATA

[Value Type(s)] TW_BOOL
[Default Value] TRUE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

Application can get if data source supports custom ds data operations. If TRUE, application can control scan setting via text data using DG_CONTROL / DAT_CUSTOMDSDATA / MSG_GET and DG_CONTROL / DAT_CUSTOMDSDATA / MSG_SET.

CAP_DEVICEONLINE

[Value Type(s)] TW_BOOL
[Default Value] --
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

If TRUE, scanner is working correctly.

CAP_DUPLEX

[Value Type(s)] TW_UINT16
[Default Value] TWDX_NONE
[Allowed Values] TWDX_NONE, TWDX_1PASSDUPLEX, TWDX_2PASSDUPLEX
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

This capability indicates whether the scanner supports duplex ADF. This capability also indicates whether one pass or two-pass duplex is supported. If ADF is not equipped, TWDX_NONE is returned. If ADF supports duplex, data source returns TWDX_1PASSDUPLEX or TWDX_2PASSDUPLEX. 1 pass duplex means this ADF scans front side and back side at the same time, and 2 pass duplex means front and back sides are scanned one after the other.

CAP_DUPLEXNABLED

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

MSG_SET to TRUE to scan both sides of a paper; otherwise, scan only one side of the image Note:
When you use ADF, set CAP_FEEDERENABLED to TRUE first. If CAP_FEEDERENABLED is FALSE, data source returns TWRC_FAILURE / TWCC_BADCAP for MSG_SET of CAP_DUPLEXENABLED.

CAP_ENABLEDSUIONLY

[Value Type(s)] TW_BOOL
[Default Value] TRUE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

Application can get if data source supports built-in user interface for setting. If TRUE, data source can show setting user interface using DG_CONTROL / DAT_USERINTERFACE / MSG_ENABLEDSUIONLY.

CAP_FEEDERALIGNMENT

[Value Type(s)] TW_UINT16
[Default Value] It depends on ADF. Refer to the following note.
[Allowed Values] TWFA_LEFT, TWFA_CENTER, TWFA_RIGHT
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

Application can get the type of the ADF alignment. The table below indicates relationships between scan area and offset for each capability value.

Capability value Coordination of scan area
TWFA_LEFT Data source scans area as specified.
TWFA_CENTER 1. If both the Top and Left coordinates are zero, offset of x-axis is defined as follows using the Right coordinate.
Offset = (ICAP_PHYSICALWIDTH – Right coordinate)/2
It does not affect the width of x-axis and y-axis coordinates.
2. In other cases, data source scans area as specified.
TWFA_RIGHT 1. If both the Top and Left coordinates are zero, offset of x-axis is defined as follows using the Right coordinate.
Offset = (ICAP_PHYSICALWIDTH – Right coordinate)
It does not affect the width of x-axis and y-axis coordinates.
2. In other cases, data source scans area as specified.

This function enables application to set scanning area without consideration of ADF types (left-aligned, centeraligned, right-aligned). But, application can specify scan area explicitly when the Top or Left coordinates are zero. Notes:
TWAF_NOTE is not supported. If application would like to set marquee, please set offset from scanner origin, not from document origin.Here is an example how to set marquee for TW_FA_CENTER scanner.
(1) x1 is the offset from scanner origin to paper origin ((= Max scanning area – document width ) / 2).
(2) (x2, y2) is the offset from paper origin to left/top point of marquee.
When application would like to set marquee, please set CAP _FEEDERALIGNMENT = TW_FA_LEFT first, and then set offset as (x1+x2, y2)  

CAP_FEEDERENABLED

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

To inquire if Auto Document Feeder or Multi Photo Feeder is equipped or to enable the ADF or MPF to be present. MSG_SET to TRUE to scan both sides of a paper; otherwise, scan only one side of the image. FALSE to scan a paper on the document table. In case this capability is set to FALSE, other Auto document feeder related capabilities cannot be operated. To inquire if Auto Document Feeder or Multi Photo Feeder is equipped, invoke MSG_GET of CAP_FEEDERENABLED. If neither Auto Document Feeder nor Multi Photo Feeder is equipped, data source returns TWRC_FAILURE / TWCC_BADCAP.

CAP_FEEDERLOADED

[Value Type(s)] TW_BOOL
[Default Value] --
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

Returns the status of material on the Auto Document Feeder or Multi Photo Feeder tray. If TRUE, Source's feeder is available. Before invoking this capability, CAP_FEEDERENABLED must be TRUE.

CAP_FEEDPAGE

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] N/A
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_SET

[Description]

If TRUE, the Source will eject the current page and advances the next page in the document feeder into the feeder acquire area. This capability is available for Multi Photo Feeder only. Before setting CAP_FEEDPAGE, set CAP_FEEDENABLED to TRUE first. And then set CAP_AUTOFEED to FALSE. Note:
The Epson scanner Auto Document Feeder always feeds document automatically. This capability is invalid for Auto Document Feeder.

CAP_INDICATORS

[Value Type(s)] TW_BOOL
[Default Value] TRUE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Use the Source's progress indicator. If this capability is set to TRUE, progress indicator is shown during scanning. If FALSE, progress indicator is not shown in UI suppress mode. Note:
In UI mode, progress mode is always shown nevertheless the value of this capability. With Epson Scan, Warming up message is also suppressed if this capability is set to FALSE. With Epson TWAIN 5, Warming up message is always shown even if this capability is set to FALSE.  

CAP_SERIALNUMBER

[Value Type(s)] TW_STR255
[Containers for MSG_GET] TW_ONEVALUE
[Allowed Operations] MSG_GET

[Description]

MSG_GET returns serial number stored in the scanner. MSG_SET is not allowed. Note:
Serial number is not returned if scanner doesn’t store serial number in the scanner. Only Windows version supports this capability.

CAP_UICONTROLLABLE

[Value Type(s)] TW_BOOL
[Default Value] --
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

If data source returns TRUE, this capability indicates that Source supports acquisitions with UI disabled. In other words, TW_USERINTERFACE.ShowUI can be set to FALSE in MSG_ENABLEDS.

CAP_XFERCOUNT

[Value Type(s)] TW_INT16
[Default Value] -1
[Allowed Values] -1 ~2^15
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

This capability specifies number of sheets to be scanned. It is valid only for ADF scanning. Scanner’s behaviors for each value are defined as follows.
1~2^15: Scans specified number of sheets.
-1: Scans all sheets in ADF
0: Returns TWRC_FAILURE (TWCC_BADVALUE) Note:
When value is zero, TWRC_FAILURE is returned, because TWAIN specification does not allow zero. This capability is ignored when ADF scanning is disabled (CAP_FEEDERENABLED is FALSE).

ICAP_AUTOMATICBORDERDETECTION

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

This capability enables automatic cropping by data source. This capability is available for the scanner that its background isn’t white. Currently, GT-S80 / GT-S50 / GTS85 / GT-S55 / DS-510 / DS-560 satisfy it. This capability cannot be used for other scanners. To use this capability, ICAP_UNDEFINEDIMAGESIZE need to be set to TRUE.

ICAP_AUTOMATICDESKEW

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Turns automatic deskew correction on and off. Note:
This function is for text documents only. If this function is applied to a photograph, correct result is not gotten.  

ICAP_AUTOMATICROTATE

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

This capability enables to rotate image automatically. This feature uses OCR engine and judges correct document orientation. So scanned image should include text data (picture is not rotated correctly). If this is set to TRUE, ICAP_ORIENTATION is ignored. Epson Scan OCR component must be installed to use this capability.

ICAP_AUTOSIZE

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

This capability enables to crop scanned image to actual paper size.

ICAP_BITDEPTH

[Value Type(s)] TW_UINT16
[Default Value] 8
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies the pixel bit depth for current value of ICAP_PIXELTYPE. Definition of the value and data source behavior is different between the versions. Epson TWAIN and until Epson Scan Ver. 3.8.
Value is the bit depth of each channel, for example, if RGB color 24 bit, ICAP_BITDEPTH is 8.
Allowed value depends on connected scanner.
If maximum 48 bit color scanner, it allows 1, 8, and 16.
36-bit scanner, it allows 1, 8, and 12.
In the ICAP_BITDEPTH section of TWAIN specification, it states, “Specifies the pixel bit for the current value of ICAP_PIXELTYPE. For example, when using ICAP_PIXELTYPE = TW_GRAY, this capability specifies whether this is 8-bit gray or 4-bit gray.”, however, Epson TWAIN driver has no relationship between ICAP_BITDEPTH and ICAP_PIXELTYPE. Epson Scan Ver. 3.9 or later.
Value is the bit depth of all channels. For example, if RGB color 24bit, ICAP_BITDEPTH is 24.
In addition, only available value is returned depend on the ICAP_PIXELTYPE. For example, if 48 bit scanner and ICAP_PIXELTYPE is color (TWPT_RGB), MSG_GET for ICAP_BITDEPTH returns, 24 and 48. The following table shows returned value of ICAP_BITDEPTH for each ICAP_PIXELTYPE and data source version.

Current value of ICAP_PIXELTYPE Returned value of MSG_GET for ICAP_BITDEPTH
- Ver. 3.8 Ver. 3.9 -
Color (TWPT_RGB) 1, 8, (12), (14), (16) 24, (36), (42), (48)
Grayscale (TWPT_GRAY) ditto 8, (12), (14), (16)
Black and White (TWPT_BW) ditto 1

Note:
48 (42, 36) bit color or 16 (14, 12) bit grayscale is only available when ICAP_XFERMECH is TWSX_MEMORY). It is not available when file transfer and native transfer.

ICAP_BITORDER

[Value Type(s)] TW_UINT16
[Default Value] TWBO_MSBFIRST
[Allowed Values] TWBO_MSBFIRST
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies how the bytes in an image are filled by the Source. If the value is TWBO_MSBFIRST, most significant digit is MSB. Note:
Allowed value for Epson TWAIN driver is always TWBO_MSBFIRST. TWBO_LSBFIRST cannot be specified.

ICAP_BRIGHTNESS

[Value Type(s)] TW_FIX32
[Default Value] 0
[Allowed Values] -1000 to +1000
[Containers for MSG_GET] TW_RANGE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies source brightness values. Range of allowed values are as follows: -1000 (darkest) <= a value <= +1000 (brightest)
Ver.3.66 or later of Ver.3.66 supports this capability when ICAP_BITDEPTH = 1(B&W). In other versions, this capability is not available when B&W scanning. Relationship among ICAP_BRIGHTNESS, ICAP_CONTRAST and ICAP_GAMMA:
First of all, in TWAIN specification states a value for ICAP_BRIGHTNESS and ICAP_CONTRAST requires normalization that makes the value from -1000 to 1000. In the description below, specified value of which range is from –1000 to 1000. This is converted to -127 to 127 with the following formula. x = x * 127 / 1000 Formula that gives LUT is as follows: Here, In: Input value Out: Output value Br: Brightness, Co: Contrast, Gm: Gamma Wrk = (255*(In-Co))/(255-2*Co)+Br If Wrk is less than 0 or Wrk is larger than 255, it is truncated to 0 or 255.
Final LUT is given by the following formula with Gamma conversion. Out = 255 * (Wrk/255) ^ (1/Gm) “^” indicates Power operator  

ICAP_COMPRESSION

[Value Type(s)] TW_UINT16
[Default Value] TWCP_NONE
[Allowed Values] TWCP_NONE, TWCP_JPEG, TWCP_GROUP4
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Specifies compression method for Buffered Memory and File Transfers. This capability is supported from Ver.3.9 or later and Ver.3.6 series after Ver.3.64. TWCP_JPEG is supported for Buffered Memory Transfers. TWCP_JPEG and TWCP_GROUP4 is supported for File Transfers. In addition, Ver.3.66 or later of Ver.3.66 supports TWCP_GROUP4 when memory transfer.

ICAP_CONTRAST

[Value Type(s)] TW_FIX32
[Default Value] 0
[Allowed Values] -1000 to +1000
[Containers for MSG_GET] TW_RANGE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies contrast values. Allowed value is as follows: -1000 (minimum) <= a value <= +1000 (maximum) Note:
This capability is related to ICAP_BRIGHTNESS and ICAP_GAMMA. See ICAP_BRIGHTNESS.
Ver.3.66 or later of Ver.3.66 supports this capability when ICAP_BITDEPTH = 1(B&W). In other versions, this capability is not available when B&W scanning.

ICAP_GAMMA

[Value Type(s)] TW_FIX32
[Default Value] 2.2
[Allowed Values] 0.5 to 3.0
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Gamma correction value for the image data. Allowed value is as follows:
0.5 (Darkest) <= a value <= 3.0 (Brightest) Note:
This capability is related to ICAP_BRIGHTNESS and ICAP_CONTRAST. See ICAP_BRIGHTNESS.

ICAP_HALFTONES

[Value Type(s)] TW_STR32
[Default Value] "None"
[Allowed Values] See below
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Specifies square-cell halftone (dithering) matrix to be used Allowed values are as follows. Strings are translated to each language.
<English version>
"None"
"Mode A (Hard tone)"
"Mode B (Soft tone)"
"Mode C (Net Screen)"
"Dither A (4x4 Bayer)"
"Dither B (4x4 Spiral)"
"Dither C (4x4 Net Screen)"
"Dither D (8x4 Net Screen)" In addition, if connected scanner supports TET (Text Enhancement Technology) and AAS (Auto Area Segmentation), the following options can also be selected.
<English version>
"Text Enhancement Technology"
"Auto Area Segmentation"

ICAP_IMAGEMERGE

[Value Type(s)] TW_UINT16
[Default Value] TWIM_NONE
[Allowed Values] TWIM_NONE, TWIM_FRONTONTOP, TWIM_FRONTONLEFT
[Containers for MSG_GET] TW_ENUMERATION, TW_ONEVALUE
[Containers for MSG_SET] TW_ENUMERATION, TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specify image stitching function ON and OFF and how stitch images. If TWIM_FRONTONTOP is set, front side is put on top and back side is put on the bottom, then stitch images. So height of stitched image is double of scanned image. If TWIM_FRONTONLEFT is set, front side is put on left and back side is put on the right, then stitch images. So width of stitched image is double of scanned image. Set CAP_DUPLEXENABLED to TRUE to use this capability. Note:
TWIM_FRONTONBOTTOM and TWIM_FRONTONRIGHT is not supported and return TWRC_FAILURE / TWCC_BADVALUE  

ICAP_LIGHTSOURCE

[Value Type(s)] TW_UINT16
[Default Value] TWLS_WHITE
[Allowed Values] TWLS_WHITE, TWLS_RED, TWLS_GREEN, TWLS_BLUE
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specify drop out color, if connected scanner supports this feature. This capability is valid when ICAP_PIXELTYPE is TWPT_BW. Note:
This capability is supported in Epson Scan. If connected scanner does not support drop out color, data source returns TWRC_FAILURE / TWCC_BADCAP.

ICAP_ORIENTATION

[Value Type(s)] TW_UINT16
[Default Value] TWOR_PORTRAIT
[Allowed Values] TWOR_PORTRAIT, TWOR_LANDSCAPE
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Specify document feeding orientation. If TWOR_PORTRAIT is selected, scanned image is transferred to the application without rotation. If TWOR_LANDSCAPE is selected, scanned image is rotated 270degree and transferred to the application.

ICAP_PHYSICALHEIGHT

[Value Type(s)] TW_FIX32
[Default Value] Maximum height of scanning area of connected scanner
[Allowed Values] --
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

Data source returns maximum height that data source can acquire (in ICAP_UNITS) for current document source. Returned value depends on connected scanner and document source (Document table, Auto document feeder, Multi Photo Feeder or transparency unit). Unit of the value is determined by a value of ICAP_UNITS. Notes:
When scanning is performed from document table (the case where neither Auto Document Feeder, Multi Photo Feeder or Transparency Unit is connected, or the case Auto Document Feeder or Multi Photo Feeder is connected and CAP_FEEDERENABLED is FALSE, or the case where Transparency Unit is connected and ICAP_LIGHTPATH is TWLP_REFLECTIVE), data source returns maximum height of scanning area for document table. When scanning is performed using Auto document feeder or Multi Photo Feeder (that means Auto Document Feeder or Multi Photo Feeder is connected and CAP_FEEDERENABLED is TRUE), data source returns maximum height of scanning area for Auto Document Feeder or Multi Photo Feeder. When scanning is performed using Transparency unit (that means Transparency unit is connected and ICAP_LIGHTPATH is TWLP_TRANSMISSIVE), data source returns maximum height of scanning area for Transparency unit. Unit of value depends on ICAP_UNITS. Allowed values for ICAP_UNITS are as follows: cm、inches, pixels
If TWUN_PIXELS is selected, actual size is determined by current Resolution and Scaling value (ICAP_YRESOLUTION and ICAP_YSCALING).

ICAP_PHYSICALWIDTH

[Value Type(s)] TW_FIX32
[Default Value] Maximum width of scanning area of connected scanner
[Allowed Values] --
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] N/A
[Allowed Operations] MSG_GET

[Description]

Data source returns maximum width that Source can acquire (in ICAP_UNITS) for current document source. Data source returns maximum height that data source can acquire (in ICAP_UNITS) for current document source. Returned value depends on connected scanner and document source (Document table, Auto document feeder, Multi Photo Feeder or transparency unit). Unit of the value is determined by a value of ICAP_UNITS. Notes:
When scanning is performed from document table (that means the case where neither Auto Document Feeder, Multi Photo Feeder or Transparency Unit is connected, or the case where Auto document feeder or Multi Photo Feeder is connected and CAP_FEEDERENABLED is FALSE, or the case Transparency Unit is connected and ICAP_LIGHTPATH is TWLP_REFLECTIVE), data source returns maximum width of scanning area for document table. When scanning is performed using Auto Document Feeder or Multi Photo Feeder (that means Auto document feeder or Multi Photo Feeder is connected and CAP_FEEDERENABLED is TRUE), data source returns maximum width of scanning area for Auto document feeder or Multi Photo Feeder. When scanning is performed using Transparency unit (that means Transparency unit is connected and ICAP_LIGHTPATH is TWLP_TRANSMISSIVE), data source returns maximum width of scanning area for Transparency unit. Unit of value depends on ICAP_UNITS. Allowed value for ICAP_UNITS is as follows: cm、inches, pixels
If TWUN_PIXELS is selected, actual size is determined by current Resolution and Scaling value (ICAP_XRESOLUTION and ICAP_XSCALING).  

ICAP_PIXELFLAVOR

[Value Type(s)] TW_UINT16
[Default Value] TWPF_CHOCOLATE
[Allowed Values] TWPF_CHOCOLATE, TWPF_VANILLA
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Returns sense of the pixel whose numeric value is zero For example, in Black and White image, In case CAP_PIXELTYPE is TW_BW:
If ICAP_PIXELFLAVOR is set to TWPF_CHOCOLATE, Black is expressed with 0.
And if ICAP_PIXELFLAVOR is set to TWPF_VANILLA, White is expressed with 0. Note:
This capability affects each value of ICAP_PIXELTYPE individually. However, this capability is valid only when ICAP_PXIELTYPE is TWPT_BW or TWPT_GRAY.

ICAP_PIXELTYPE

[Value Type(s)] TW_UINT16
[Default Value] TW_RGB
TW_BW (Ver.3.64 or later of Ver.3.6x)
[Allowed Values] TWPT_BW, TWPT_GRAY, TWPT_RGB
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies the type of pixel data (B/W, gray, color, etc.) Please refer to ICAP_BITDEPTH for the combination between ICAP_PIXELTYPE and ICAP_BITDEPTH.

ICAP_PLANARCHUNKY

[Value Type(s)] TW_UINT16
[Default Value] TWPC_CHUNKY
[Allowed Values] TWPC_CHUNKY
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Color data format - Planar or Chunky Note:
In Epson TWAIN driver, only TWPC_CHUNKY is allowed.  

ICAP_ROTATION

[Value Type(s)] TW_FIX32
[Default Value] 0
[Allowed Values] 0, 90, 180 and 270
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Specifies rotation of the image. It can be used with ICAP_ORIENTATION.

ICAP_SUPPORTEDSIZES

[Value Type(s)] TW_UINT16
[Default Value] TWSS_NONE(0)
[Allowed Values] TWSS_NONE(0), TWSS_A4LETTER, TWSS_A4(1), TWSS_B5LETTER, TWSS_JISB5 (2), TWSS_USLETTER(3), TWSS_USLEGAL(4), TWSS_A5(5), TWSS_USLEDGER(9), TWSS_A3(11), TWSS_JISB4(38), TWSS_ISOB4, TWSS_B4(6) (this is supported only for Ver.3.48 or Ver3.70 or later. Ver.3.47 or before and Ver.3.5x - Ver3.6x are not supported.)
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE, TW_ENUMERATION
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Application can get the supported fixed paper size. It also can specify the fixed paper sizes. Notes:

  1. Supported sizes.
    Supported sizes are displayed on Office mode also. Returned value for MSG_GET is all paper sizes that the data source supports. It doesn’t depend on the connected option. For example, Legal size is returned even if flatbed of A4 scanner is selected. This is because application can specify CAP_FEEDERENABLED after the ICAP_SUPPORTEDSIZES. In this case, there is a possibility that data source can not reflect the specified value because specified size is not supported for the scanning source (like ADF). Supported sizes and scanner models are as follows. Landscape orientation is not supported.
    Constants Actual size: H x W A3 A4 ADF scanner A4 non ADF scanner
    TWSS_NONE Supported max size Y Y Y
    TWSS_A5 148 x 210(mm) Y Y Y
    TWSS_B5LETTER, TWSS_JISB5 182 x 257(mm) Y Y Y
    TWSS_USLETTER 8.5 x 11.0(inch) Y Y Y
    TWSS_A4LETTER, TWSS_A4 210 x 297(mm) Y Y Y
    TWSS_USLEGAL 8.5 x 14.0(inch) Y Y N
    TWSS_USLEDGER 11.0 x 17.0(inch) Y N N
    TWSS_JISB4 257 x 364(mm) Y N N
    TWSS_B4 257 x 364(mm) Y N N
    TWSS_A3 297 x 420(mm) Y N N
  2. Relation between ICAP_FRAMES, DAT_IMAGELAYOUT and ICAP_SUPPORTEDSIZES ICAP_SUPPORTEDSIZES affects current setting of ICAP_FRAMES and DAT_IMAGELAYOUT.
    • Fixed size is specified at ICAP_SUPPORTEDSIZES
      ICAP_FRAMES and DAT_IMAGELAYOUT are changed to that fixed size. Offset is treated as origin (0.0).
    • TWSS_NONE is specified at ICAP_SUPPORTEDSIZES
      ICAP_FRAMES and DAT_IMAGELAYOUT are changed to the ICAP_PHYSICALWIDTH/HEIGHT. It is because of the description of TWAIN specification “TWSS_NONE indicates that the maximum image size supported by the device is to be used.”
    • Size is specified at ICAP_FRAMES or DAT_IMAGELAYOUT. Current value of ICAP_SUPPORTEDSIZES is changed to the TWSS_NONE.
      Note:
      Current value of ICAP_SUPPORTEDSIZES is changed to the TWSS_NONE when fixed size is set at ICAP_FRAMES or DAT_ IMAGELAYOUT. (E.g. ICAP_SUPPORTEDSIZES is changed to TWSS_NONE, not to TWSS_A4 when 210 x 297mm is set to ICAP_FRAMES or DAT_ IMAGELAYOUT.
  3. Relation with CAP_EP_AUTOLAYOUT
    There is no influence when CAP_EP_AUTOLAYOUT is FALSE. If CAP_EP_AUTOLAYOUT is TRUE, settings of ICAP_SUPPORTEDSIZES, ICAP_FRAME or DAT_IMAGEINFO are ignored.
  4. Relation with scanner option like ADF
    Data source accepts all values for MSG_SET regardless of the setting of ADF. When larger size is set to the ICAP_SUPPORTEDSIZES (e.g. Legal size is set to the ICAP_SUPPORTEDSIZES but ADF is not connected), ICAP_FRAME and DAT_IMAGEINFO are changed to the ICAP_PHYSICALWIDTH/HEIGHT. When scanner option is changed, data source works as following.
    • When current value of ICAP_SUPPORTEDSIZES is TWSS_NONE
      Default/Current value of ICAP_FRAME and DAT_IMAGEINFO are changed to the ICAP_PHYSICALWIDTH/HEIGHT of each scanning option.
    • When current value of ICAP_SUPPORTEDSIZES is other than TWSS_NONE
      Current value of ICAP_FRAME and DAT_IMAGEINFO is changed to the current value of ICAP_SUPPORTEDSIZES. (E.g. when scanner option is changed from flatbed to ADF and Legal size is specified at ICAP_SUPPORTEDSIZES, ICAP_FRAME and DAT_IMAGEINFO are changed to the legal size. But when scanning size is bigger than maximum size, the value is changed to the ICAP_PHYSICALWIDTH/HEIGHT.
      Remark.
      Current value is not changed to the TWSS_NONE, it keeps the value.

ICAP_THRESHOLD

[Value Type(s)] TW_FIX32
[Default Value] 128
[Allowed Values] 0 to 255 (step size =1.0)
[Containers for MSG_GET] TW_RANGE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

Specifies the dividing line between black and white values. This capability is referenced when ICAP_PIXELTYPE is TWPT_BW.

ICAP_ UNDEFINEDIMAGESIZE

[Value Type(s)] TW_BOOL
[Default Value] FALSE
[Allowed Values] TRUE or FALSE
[Containers for MSG_GET] TW_ONEVALUE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_SET

[Description]

This capability enables automatic cropping by data source. This capability is available for the scanner that its background isn’t white. Currently, GT-S80 / S50 / S85 / S55 satisfy it. This capability cannot be used for other scanners. To use this capability, ICAP_AUTOMATICBORDERDETECTION need to be set to TRUE.

ICAP_UNITS

[Value Type(s)] TW_UNIT16
[Default Value] TWUN_INCHES
[Allowed Values] TWUN_INCHES, TWUN_CENTIMETERS, TWUN_PIXELS
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies Unit of measure (inches, centimeters). This capability specifies unit for cropping area settings. Centimeters and inches are allowed for cropping area. Pixel is allowed for Physical Height and Width. The value of this Capability affects the following operations:
ICAP_PHYSICALHEIGHT
ICAP_PHYSICALWIDTH
DG_IMAGE / DAT_IMAGELAYOUT  

ICAP_XFERMECH

[Value Type(s)] TW_UNIT16
[Default Value] TWSX_NATIVE
[Allowed Values] TWSX_NATIVE, TWSX_MEMORY, TWSX_FILE
[Containers for MSG_GET] TW_ENUMERATION
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies transfer mechanism - used to learn options and set-up for upcoming transfer. The following values are allowed:
TWSX_NATIVE - Native transfer mode
TWSX_MEMORY - Buffer memory transfer mode
TWSX_ FILE - File transfer mode (Ver.3.9 or later, and Ver.3.6series after Ver.3.64) Note:
For 48 (42, 36) bit color or 16 (14, 12) bit grayscale scanning, Native transfer mode cannot be used. Make sure to specify TWSX_MEMORY for these bit depth.

ICAP_XRESOLUTION

[Value Type(s)] TW_FIX32
[Default Value] 72
[Allowed Values] Depends on scanner
[Containers for MSG_GET] TW_RANGE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies current/available optical resolutions for x-axis.

ICAP_XSCALING

[Value Type(s)] TW_FIX32
[Default Value] 1.0 (100%)
[Allowed Values] 0.5 to 2.0
[Containers for MSG_GET] TW_RANGE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies scaling value (1.0 = 100%) for x-axis

ICAP_YRESOLUTION

[Value Type(s)] TW_FIX32
[Default Value] 72
[Allowed Values] Depends on scanner
[Containers for MSG_GET] TW_RANGE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies current/available optical resolutions for y-axis

CAP_AUTOFEED

[Value Type(s)] TW_FIX32
[Default Value] 1.0 (100%)
[Allowed Values] 0.5 to 2.0
[Containers for MSG_GET] TW_RANGE
[Containers for MSG_SET] TW_ONEVALUE
[Allowed Operations] MSG_GET, MSG_GETCURRENT, MSG_SET

[Description]

Specifies scaling value (1.0 = 100%) for y-axis