CImage:Sqrt
The Sqrt method computes the square root of the pixel values.
bResult = CImage:Sqrt() |
On success, this method returns true.
On failure, this method returns false.
This method has a possibility of an illegal square root of a negative number operation if a negative valued pixel is encountered. 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.
Suppose an image is displayed in a CImageView named V. The following script computes the square root of the image values and redisplays the result:
|
-- attach the current displayed image |
|
-- perform the operation |
|
-- update the display after the shift |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.