GetBitsPerChannel
Top  Previous  Next

Description

Returns the number of bits per color component of a pixel.


Syntax


[VB]
Value=objActiveDcam.GetBitsPerChannel()


[C/C++]
HRESULT GetBitsPerChannel(long* pValue );


Data Types
[VB]

Return value: Long


Parameters
[C/C++]

pValue [out,retval]  
Pointer to the number of bytes per pixel  


Return Values


S_OK  
Success  
E_FAIL  
Failure  
 

Example


This VB example reads and displays the pixel depth:

value=ActiveDcam1.GetBitsPerChannel()
MsgBox value
 

Remarks


The method returns the pixel depth of the internal image buffer of the ActiveDcam object after the unpacking and color interpolation is performed. Depending on the selected format, the following value will be returned:

Pixel Format
Bits per channel
Mono8
8
Mono16+BitShift 6
10
Mono16+BitShift 4
12
Mono16+BitShift 0
16
Raw8+Bayer , RGB(8:8:8), YUV(4:1:1), YUV(4:2:2), YUV(4:4:4)
8
Raw16+Bayer+BitShift 6
10
Raw16+Bayer+BitShift 4
12
Raw16+Bayer+BitShift 0
16
RGB(16:16:16)
16