setIndex()

Description

Sets the image with the specified index as the current image.

Syntax

ImageViewerObject.image.setIndex(iValue);

Parameters

<int> iValue: the value to set

Return value

bool

Remarks

The index is 0 based.

When image buffer is full, that is to say, the return value of getCount() equals the return value of getCapacity(), the newly grabbed image will not be imported into the image viewer.

When an error occurs, check getErrorCode() or getErrorString() for error information.

Example

             var imageviewer = DCSObject.getImageViewer ("ImageViewerContainer");  // Get a specified image viewer
             imageviewer.image.setIndex(3);  // Set the second image as the current image
      

See also

.image.getIndex()
.image.getCapacity()
.image.getCount()

Is this page helpful?

Leave a Reply

Your email address will not be published.