CImage:Log10
The Log10 method computes the base 10 logarithm of the pixel values. THe result replaces the image.
bSuccess = CImage:Log10() where |
bSuccess is the returned success code. On success it is true, otherwise false.
The Log10 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 and computes the log-10 of all the pixels:
|
-- create a new CImage |
|
-- load the image from a file named sPath |
|
-- Compute the base 10 logarithm |