CImage:Xdiv
The Xdiv method divides a constant value by the image pixels.
bResult = CImage:Xdiv( x ) |
The value x may be passed as a number or a string.
On success, this method returns true
On failure, this method returns false.
Usually, the image should have real type pixels before using this method. The pixel type can be tested and changed using IsReal and SetPixelType . See Pixel Types for more information.
The value x can be passed as a numeric value or a string. Using a string is the only way to pass an rgb color value but it may also be used for numeric type images.
The following script loads an image from the file sPath, divides into 1.0, and saves the result back to the file. This produces an image that is the reciprocal of the original image:
|
-- create a new CImage |
|
-- load the image from a file named sPath |
|
-- perform the operation |
|
|
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.