SetImageSize
Top  Previous  Next

Description

Sets the horizontal and vertical size of outgoing images.

[C++]
int
 SetImageSize(int width, int height,  unsigned int channelIndex=0);


Parameters
[C/C++]
 
[in] int width  
Horizontal size of the image in pixels.  
 
[in] int height  
Vertical size of the image in pixels.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
 

Example

This fragment of code instantiates a camera object and sets up initial values for the image transfer :

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
 
m_pCamera->SetImageSize (1024, 768);  
m_pCamera->AddPixelFormat("Mono16");  
 

Remarks


This method modifies the values of the Width and Height features of the virtual camera and recalculates the value of the PayloadSize feature based on the current PixelFormat. It does not do any manipulation with an actual image buffer. You have to make sure that the image data in the buffer are compliant with the specified horizontal and vertical size of the image.

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

The actual size of each transmitted frame can be variable and smaller than the current image size. See SendImage for more details.

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.