CImage:Pow


The Pow method raises the image pixels to a specified power.

Syntax

bResult = CImage:Pow()

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 pixel value 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 the pixel values to the 1/4 power and redisplays the result:

I = V:GetImage()

-- attach the current displayed image

I:Pow( 0.25 )

-- perform the operation

V:Update()

-- update the display after the shift

Related Topics

CImage class, Powa, Powab, Sqrt


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