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



Return value


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


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.


             var imageviewer = DCSObject.getImageViewer ("ImageViewerContainer");  // Get a specified image viewer
             imageviewer.image.getIndex();  // Gets the index of the current image 

See also


Is this page helpful?

Leave a Reply

Your email address will not be published.