--color

Top  Previous  Next

--color colorval        

 

The --color determines the color type of the acqured image.  The colorval values are 0, 1, 2, 3, 4, or 5.  


colorval value 

Image acquired

0   

Monochrome (Black and White)

1          

Grayscale

2

Color Image (RGB)

3

Palette (default palette by the device is used)

4

CMY

5

CMYK 



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.