DTWAIN_SetPixelType

Top  Previous  Next

The DTWAIN_SetPixelType function sets the current Pixel Type (Color) and Bit Depth (Bits Per Pixel) that will be used when acquiring an image.

 

DTWAIN_BOOL DTWAIN_SetPixelType (

DTWAIN_SOURCE

Source,

LONG

PixelType,

LONG

BitDepth

DTWAIN_BOOL

bSetCurrent );

 

Parameters

Source

An open TWAIN Source.

 

PixelType

Current pixel type.

 

BitDepth

Current bit depth or DTWAIN_DEFAULT.

 

bSetCurrent

Determines whether to set the current or default pixel/bit depth.

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_SetPixelType function sets the current pixel color and bit depth for the next acquired image.  On successful return of DTWAIN_SetPixelType, the PixelType is the pixel type, and BitDepth is the bit depth or DTWAIN_DEFAULT if the default bit depth is to be used.

 

If bSetCurrent is TRUE, the current pixel type is set.  Note that the bit depth current/default set type is determined by the BitDepth argument, not by bSetCurrent.

 

The pixel type can be any of the Pixel Type Constants.  The bit depth is a LONG number denoting the number of bits per pixel.

 

TWAIN State Transitions

The Source must be in State 4. or higher

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

DTWAIN Source Selection Function

 

 

See Also

Setting Pixel and Bit Depth