CAP_CAMERASIDE

Featured Clients

Sectors: FinanceInformation TechnoloyGovernmentHealthcareIndustriesEducation(show all)

TWAIN Capability: CAP_CAMERASIDE

CAP_CAMERASIDE

Description

TWAIN models a duplex scanner as conceptually having two 'cameras' - a 'top' camera that captures the front of each page, and a 'bottom' camera that captures the back. Some devices allow these two logical cameras to operate with different settings for certain capabilities. CAP_CAMERASIDE provides a simple way to address the cameras individually: The value of CAP_CAMERASIDE determines whether subsequent capability negotiation is directed to one camera or the other, or to both.

Application

The application sets which camera it wishes to address with CAP_CAMERASIDE. The application then sets any capability that allows independent values for the top and bottom.

There is no easy way to determine if a capability supports independent values for the top and bottom, though as a general rule the ICAP_ capabilities are more likely to allow this. An application can determine support by setting one side, then testing the other side to see if it has changed.

Mixing camera selection using DAT_FILESYSTEM and CAP_CAMERASIDE is not recommended, and may produce unexpected results.

Source

Values

If set to TWCS_BOTH (the default) then DAT_CAPABILITY / MSG_SET and MSG_RESET operations apply to the top and bottom. MSG_GET operations get their data from the top camera.

If set to TWCS_TOP or TWCS_BOTTOM, and if the capability being negotiated allows separate values for the top and bottom, then only the side addressed by this capability will be changed as part of a MSG_SET or MSG_RESET, or returned as part of a MSG_GET.

If a capability does not allow separate values for the top and bottom (for instance CAP_DUPLEXENABLED), then the current value of CAP_CAMERASIDE has no impact on how it is negotiated.

CAP_CAMERASIDE and CAP_DUPLEXENABLED are independent and have no effect on each other. That is, if CAP_DUPLEXENABLED is FALSE, CAP_CAMERASIDE can still be set to TWCS_BOTTOM.

If DAT_FILESYSTEM is also supported by the source, it must keep it in sync with the current value of this capability.

Consider the following sequence:

CAP_CAMERASIDE set to TWCS_TOP ICAP_XRESOLUTION set to CAP_CAMERASIDE set to TWCS_BOTTOM ICAP_XRESOLUTION set to CAP_CAMERASIDE set to TWCS_BOTH

At this point getting the value of ICAP_XRESOLUTION will return a value of 200, even though the bottom is currently set to 300. This is acceptable behavior. It is up to the application to correctly use CAP_CAMERASIDE.

Type: TW_UINT

Value after MSG_OPENDS: (may be remembered from a previous session)

After MSG_RESET/MSG_RESETALL: TWCS_BOTH

Allowed Values: TWCS_BOTH TWCS_TOP TWCS_BOTTOM

Containers

MSG_GET TW_ENUMERATION TW_ONEVALUE

MSG_GETCURRENT TW_ONEVALUE

MSG_GETDEFAULT TW_ONEVALUE

MSG_SET TW_ONEVALUE

MSG_SETCONSTRAINT TW_ONEVALUE

TW_ENUMERATION

MSG_RESET TW_ONEVALUE

MSG_QUERYSUPPORT TW_ONEVALUE

Required By

None

TWAIN Version Introduced

Version 1.91

Related

TWAIN Notice

Where would you like to scan from? Scan in Web Apps Scan in Java Scan in .NET