CImage:Scale


The Scale method scales the image by a factor relative to 1.0.

Syntax

bResult = CImage:Scale( scale, bResize=false )

bullet.gif    Scale is the multiplication factor and may be a number or string.

bullet.gif    bResize controls whether the image dimension is adjusted for the scale factor.

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

The optional bResize controls whether the image shape is changed to accommodate the rotation of a non-square image.

Example

Suppose an image is displayed in a CImageView named V. The following script scales the image by 1.2 times without changing the number of image pixels (bResize=false ):

I = V:GetImage()

-- attach the current displayed image

I:Scale( 1.2 )

-- perform the operation

V:Update()

-- update the display after the scale

Related Topics

CImage class, ScaleXy


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.