CImage:Log


The Log method computes the base e logarithm of the pixel values. The result replaces the image.

Syntax

bSuccess = CImage:Log()

where

    bSuccess is the returned success code. On success it is true, otherwise 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.

Example

The following script loads an image from the file sPath and computes the log-e of all the pixels:

I = CImage:new()

-- create a new CImage

I:Open(sPath)

-- load the image from a file named sPath

I:Log()

-- perform the operation

Related Topics

Log10

CImage class