CImage:Pow CImage:Powab

CImage:Powa


The Powa method raises a number to powers specified by the image pixels.

Syntax

bResult = CImage:Pow( power )

bullet.gif    power specifies the exponent and may be a number or string.

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

This method has a possibility of an illegal operation if a negative number is raised to a non-integral power. Mira traps this condition and substitutes a replacement value into the output pixel. The replacement value is set for math operations using the SetMathErrVal method.

Example

Suppose an image is displayed in a CImageView named V. The following script raises 1.5 to powers specified by the image pixels:

I = V:GetImage()

-- attach the current displayed image

I:Powa( 1.5 )

-- perform the operation

V:Update()

-- update the display after the shift

Related Topics

CImage class, Pow, Powab, Sqrt


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