getImageInfo()

Description

Gets information (e.g., width, height) of the image specified by index in the buffer.

Syntax

ImageViewerObject.image.getImageInfo(index);

Parameters

<int> index: the index of the image

Return value

ImageInfo

Remarks

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

Example

             var imageviewer = DCSObject.getImageViewer("ImageViewerContainer");  // Get a specified image viewer
             var imageInfo = imageviewer.image.getImageInfo(imageviewer.image.getIndex);
             imageInfo.getWidth():  //Returns the width (in pixels) of the image. If it fails to get the width of the image, -1 will be returned.
             imageInfo.getHeight(): //Returns the height (in pixels) of the image. If it fails to get the height of the image, -1 will be returned.
      

See also

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