Setting Resolution, Bit Depth, etc. for Duplex Scanners

Top  Previous  Next

For most single-pass duplex scanners, there are two or more "cameras" that take a picture of the top and bottom sides of the paper that is being processed, as well as separate color and black/white cameras.  For many situations, it is possible to control each of these cameras independently in terms of setting bit depth, pixel type, resolution, etc. and also control which cameras are to be used when processing the page.

 

For example, a single-pass duplex scanner may have a "black and white" set of cameras and a "color" set of cameras.  When scanning in black and white, the resolution can be set only for the black/white cameras, without changing the resolution for the color cameras.

 

Please note:  The term ‘camera’ is used generically to describe a device that captures an image.

 

The TWAIN File System API is the specification that allows usage of multiple camera devices, and also to store images within the Source's file system.  There are very few TWAIN devices that have implemented  File System support  (however the most famous devices that do support the File System API are the Kodak series of high-end scanners).  Since there are such few sources, DTWAIN has limited support for the TWAIN File System API.  The extent of the direct DTWAIN support is to retrieve and set the various cameras that a device may have installed.  The functions are as follows:

 

DTWAIN_EnumCameras

DTWAIN_EnumTopCameras

DTWAIN_EnumBottomCameras

DTWAIN_SetCamera

 

For example, if you are using a device that has two cameras, a color camera and a black and white camera, and you need to set the resolution for the black and white camera, the steps are as follows:

 

Call DTWAIN_EnumCameras to retrieve a list of all the cameras.  The cameras will be in the form of a NULL terminated string, i.e "/Camera_BW" or something similar to this if the camera is a black and white camera.

Call DTWAIN_SetCamera to set the current camera using one of the names retrieved from DTWAIN_EnumCameras.

Call DTWAIN_SetResolution to set the resolution.

 

There are also other scenarios that you may encounter if your device has the TWAIN support for multiple cameras, and you need to set some capability for one or both cameras.  Usually, if the camera is not set, the settings that are used will be used by all cameras present.