-bpp

Top  Previous  Next

-bpp value

 

Sets the bits-per-pixel for the images that are acquired.  The bits-per-pixel (also known as the bit depth) deternines the color density of the image.  The highter the bit per pixel, the more colors will be used in the image (thus making the size of the image files larger).  Typical values for bpp are 1, 4, 8, 16, and 24.

 

Examples:

 

-bpp 1

Sets the bits-per-pixel to 1.

 

When specifying the bpp value, care must be taken that valid values are used in conjunction with the image type that is being acquired.  For example, a bpp value of 1 is the only valid value if acquiring to TIFF Group 3 or Group 4 format.

 

If no bit depth is specified, the bit depth used is the lowest bit depth value that can be used for the file type being acquired.  If a bit depth is specified, but the file type doesn't support the bit depth, the lowest bit depth value that can be used for the file type is used.

 

Below is a table describing the valids for -bpp for each file type (see the -F parameter for file types):

 

File Type

Bit Depth (Bits-Per-Pixel)



BMP        

Any bit depth

JPEG                        

8, 16, or 24

JPEG-2000

8, 16, or 24

PCX        

1, 8 or 24

Targa (TGA)                        

8 or 24

TIFF No compression        

1, 4, 8, 16, or 24

TIFF Group 3 Fax

1

TIFF Group 4 Fax

1

TIFF PackBits

1, 4, 8, 16, or 24

TIFF Deflate        

1, 4, 8, 16, or 24

TIFF LZW Compression

1, 4, 8, 16, or 24

TIFF JPEG Compression

8, 16, 24

Windows Metafile (WMF)

24

Enhanced Metafile (EMF)

24

GIF

1, 8

PNG                        

1, 8, 16, or 24

Adobe PSD                

24

Adobe PDF

1, 8, 16, 24

Adobe PostScript

1, 8, 16, 24

 

The -bpp optioin can be combined with the -color option to choose the correct color combined with the appropriate bits-per-pixel setting for the color.

 

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

 

The -color or -bpp 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 -bpp value specified in the command line (for example, the device does not support color image retrieval), or
Either -color or -bpp does not appear in the command line (most of the time, this will be the case).

 

If no available -color or -bpp 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 bits-per-pixel specified by the device for a particular color type (Black and White, Color, Grayscale, etc.).