GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / TwainGetBitDepth Method





In This Topic
TwainGetBitDepth Method (GdPictureImaging)
In This Topic
Returns the number of bit per pixel for the current value of PixelType.
Syntax
'Declaration
 
Public Function TwainGetBitDepth() As Integer
public int TwainGetBitDepth()
public function TwainGetBitDepth(): Integer; 
public function TwainGetBitDepth() : int;
public: int TwainGetBitDepth(); 
public:
int TwainGetBitDepth(); 

Return Value

If success: bit depth value. Else 0 if fail -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() methods for diagnosing the error.
Remarks

Before using this method check that the TWAIN state is >= 4 (TWAIN_SOURCE_OPEN)

Ambiguity in the Specification prior to version 2.2 may result in some Data Sources reporting just the depth-per-channel. In the majority of cases a value of 8 for ICAP_BITDEPTH when ICAP_PIXELTYPE is TWPT_RGB may be treated as if the bit depth is really 24.

See Also