GetBytesPerPixel
Top  Previous  Next

Description

Returns the number of bytes per pixel for the current video Format.


Syntax


[VB]
Value=objActiveGige.GetBytesPerPixel()


[C/C++]
HRESULT GetBytesPerPixel(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=ActiveGige1.GetBytesPerPixel()
MsgBox value
 

Remarks


The method returns the pixel depth of the internal image buffer of the ActiveGige object, which can be different from the pixel depth of the raw image outputted by the camera. For instance, the YUV 4:1:1 and YUV 4:2:2 images are always converted to the RGB 8:8:8 video, therefore the number of bytes per pixel reported for these formats will be 3. Also, when the Bayer color conversion is activated for Mono 8 and Mono 10/12/16 formats, the resulting video will have 3 or 6 bytes per pixel accordingly.