CImage:Log
The Log method computes the base e logarithm of the pixel values.
bResult = CImage:Log() |
On success, this method returns true
On failure, this method returns false.
The Log operation can produce a log of a negative number error if the pixel values are 0 or less. Mira traps this case and assigns a resultant value to the pixel as defined by the SetMathErrVal method.
The following script loads an image from the file sPath, computes the log-e of all the pixels, and saves the result back to the file:
|
-- create a new CImage |
|
-- load the image from a file named sPath |
|
-- perform the operation |
|
|
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.