Top  Previous  Next

-color colorval        


The -color determines the color type of the acqured image.  The colorval values are 0, 1, or 2.  If -color is 0, the image that will be acquired will be a monochrome (black and white) image.  If -color is 1, a gray scale image is acquired.  If -color is 2, a full color image (RGB) is acquired.  Only monochrome, grayscale, and RGB are supported.  Other color types such as CMYK are not currently supported.


It is best advised to not combine the -color parameter with the -bitsperpixel parameter unless the device supports multiple bits-per-pixel for each color type.  For example, if the device supports a color type of RGB and 8, 16, or 24-bit color images, then you would specify the following if you want to ensure that a color image with 8 bits-per-pixel is acquired:


twainsave -color 2 -bitsperpixel 8 (other options...)


The above command will set the color type to RGB and the bits-per-pixel to 8.


To get a listing of the various color and bits-per-pixel information supported by a TWAIN device, a detail log can be generated using the -details command that will contain this information.


TwainSave will attempt to choose the first available -color and -bitsperpixel value if:


The -color or -bitsperpixel values are invalid for the image type being saved (for example, saving to a TIFF Group 3 format as a color image is impossible), or
The device does not support the -color or -bitsperpixel value specified in the command line (for example, the device does not support color image retrieval), or
Either -color or -bitsperpixel does not appear in the command line (most of the time, this will be the case).


If no available -color or -bitsperpixel value can be found for the device, the device's user interface is still displayed, and the user is still allowed to start image retrieval, but using the settings that the user specifies in the device's user interface.  If no user interface was chosen (-noui), the image retrieval will still not be started, and TwainSave will exit immediately.


Default Setting:

The color value that the device determines as the default for the image being acquired.