CImage:Powab
The Powab method raises the pixels of the current image to powers specified by the pixels of the operand image. This is useful for masking or sensitivity correction operations in which the operand image is a correction mask.
bResult = CImage:Pow( CImage )
CImage is the operand image, which is unchanged by this operation.
On success, this method returns true.
On failure, this method returns false.
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.
Suppose an image is displayed in a CImageView named V. The following script loads a "mask" image from the file sPath, then applies it to a displayed image and redisplays the result:
|
-- attach the current displayed image |
|
-- create a CImage for the mask image |
|
-- load the "mask" image |
|
-- perform the operation |
|
-- update the display after the shift |
|
-- free the memory of the mask image |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.