GetPixelFormatString
Top  Previous  Next

Description

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

[C++]
const
 char* GetPixelFormatString(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


String containing the name 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");  
CString Fmt=m_pCamera->GetPixelFormatString();  
 

Remarks


This method returns the string 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 names 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.