DTWAIN_GetBitDepth

Top  Previous  Next

The DTWAIN_GetBitDepth function sets the current number of bits per pixel for the next acquired images.

 

DTWAIN_BOOL DTWAIN_GetBitDepth (

DTWAIN_SOURCE

Source,

LPLONG

lpBitDepth,

DTWAIN_BOOL

bGetCurrent );

 

Parameters

Source

An open TWAIN Source.

 

lpBitDepth

Address of where the bit depth value will be stored

 

bGetCurrent

Determines whether to get the current bit depth or the default bit depth

 

Return Values

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

 

Comments

The DTWAIN_GetBitDepth function gets the current bit depth (number of bits per pixels) for the Source Source when acquiring an image.  On return of DTWAIN_GetBitDepth, lpBitDepth will contain the bit depth.  If bGetCurrent is TRUE, the current bits per pixel is retrieved. If bGetCurrent is FALSE, the default bits per pixel is retrieved.

 

DTWAIN_GetBitDepth gets the bit depth of the current selected pixel type (see DTWAIN_GetPixelType).  Even though DTWAIN_GetPixelType also gets the bit depth, DTWAIN_GetBitDepth allows an application to get the bit depth of the current pixel type without having to know what the current pixel type is.

 

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