Top  Previous  Next


Returns the current horizontal size of outgoing images.

 GetWidth(unsigned int channelIndex = 0);


[in] unsigned int channelIndex  
Index of the associated stream channel. Possible values are 0 or 1.  

Return Values

Currently selected horizontal size of outgoing images  


This fragment of an MFC code uses the image size information to generate a periodic image pattern:

void GenerateImage(unsigned char* buffer)  
   for (unsigned int i = 0; i <  m_pCamera->GetHeight(); i++)   
      unsigned char *ptr = buffer + i* m_pCamera->GetWidth();  
      unsigned char *end = ptr +  m_pCamera->GetWidth();  
      while(ptr < end)  


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

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

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.