changeSize()

Description

Changes the size of an image specified by index.

Syntax

ImageViewerObject.image.changeSize(index, width, height, interpolationMethod);

Parameters

<int> index: specifies the index of the image to be converted. The index is 0-based.
<int> width: specifies the new width.
<int> height: specifies the new height.
EnumInterpolationMethod interpolationMethod: specifies the algorithm used to do interpolation.

Interpolation Method
EnumInterpolationMethod.NEARESTNEIGHBOUR
EnumInterpolationMethod.BILINEAR
EnumInterpolationMethod.BICUBIC

Return value

bool

true indicates success. false indicates failure.

Example

if (DCSObject) {
    var imageviewer = DCSObject.getImageViewer("ImageViewerContainer");
    imageviewer.image.changeSize(0, 200, 300, imageviewer.image.EnumInterpolationMethod.NEARESTNEIGHBOUR);
}

Remarks

EnumInterpolationMethod is under namespace image.

When false is returned, check getErrorCode() or getErrorString() for error information.

Is this page helpful?

Leave a Reply

Your email address will not be published.