GetPixelFormatValue
Top  Previous  Next

Description

Returns the numerical value of the current pixel format of outgoing images.

[C++]
unsigned int
 GetPixelFormatValue(unsigned int channelIndex = 0);

Parameters
[C/C++]
 
[out] unsigned int channelIndex  
Index of the associated stream channel. Possible values are 0 or 1.  
 

Return Values


Integer containing the GigE Vision value of the current pixel format.  
 
 
Example
 
This fragment of code sets and verifies the current pixel format :

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
 
m_pCamera->SetImageSize (1024, 768);  
m_pCamera->AddPixelFormat("Mono16");  
m_pCamera->AddPixelFormat("RGB8Packed");  
m_pCamera->SetPixelFormat("Mono16");  
int FormatId=m_pCamera->GetPixelFormatValue();  
 

Remarks


This method returns the numerical value of the PixelFormat feature of the virtual camera. It can be modified externally by a client application or internally by calling SetPixelFormat.

Width, Height, PixelFormat and PayloadSize are mandatory GigE Vision features which are automatically created when a virtual camera object is instantiated.

For the list of possible format values refer to the table in SetPixelFormat.

Note the channelIndex parameter should be used only if your virtual camera must support multiple streaming channels. For a regular GigE Vision transfer this parameter should remain in its default zero value.