DTWAIN_SetBitDepth
The DTWAIN_SetBitDepth function sets the current number of bits per pixel for the next acquired images.
DTWAIN_BOOL DTWAIN_SetBitDepth (
Parameters Source An open TWAIN Source.
BitDepth The bit depth to set
bSetCurrent Determines whether to set 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_SetBitDepth function sets the current bit depth (number of bits per pixels) for the Source Source when acquiring an image. The BitDepth is the number of bits per pixel to set. If bSetCurrent is TRUE, the current bits per pixel is set. If bSetCurrent is FALSE, the default bits per pixel is set, and the BitDepth argument is ignored.
Usually, BitDepth has the values of 1, 8, 16, 24, etc. DTWAIN_SetBitDepth sets the bit depth of the current selected pixel type (see DTWAIN_SetPixelType). Even though DTWAIN_SetPixelType also sets the bit depth, DTWAIN_SetBitDepth allows an application to set 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 Source Selection Function
See Also |