DTWAIN_GetPixelType

Top  Previous  Next

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

 

DTWAIN_BOOL DTWAIN_GetPixelType (

DTWAIN_SOURCE

Source,

LPLONG

lpPixelType,

LPLONG

lpBitDepth,

DTWAIN_BOOL

bGetCurrent );

 

Parameters

Source

An open TWAIN Source.

 

lpPixelType

Address of a LONG variable that will store the current pixel type.

 

lpBitDepth

Address of a LONG variable that will store the current bit depth.

 

bGetCurrent

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

 

Return Values

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

 

Comments

The DTWAIN_GetPixelType function gets the current pixel color and bit depth for the next acquired images.  On successful return of DTWAIN_GetPixelType, the lpPixelType is the address of a LONG that will store the pixel type, and lpBitDepth is the address of the LONG that will store the current bit depth, or NULL if the bit depth is to be ignored.  If bGetCurrent is TRUE, the current pixel and bit depth are returned.  If bGetCurrent is FALSE, the default pixel and bit depth are returned.

 

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