getIndex()

Description

Gets the index of the current image selected by Dynamsoft Camera SDK.

Syntax

ImageViewerObject.image.getIndex();

Return value

<int>

If it fails to get the index, it returns null.

Remarks

The index is 0 based.

If no image is selected, the return value of the method is -1.

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.getIndex();  // Gets the index of the current image 
      

See also

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