CImage:Exp


The Exp method raises the base e to powers defined by the pixel values. The result replaces the image.

Syntax

bSuccess = CImage:Exp()

where

    bSuccess is the returned success code. On success it is true, otherwise false.

  

The Exp operation can overflow quickly if the pixel values are large numbers. For example, if a pixel has value 100, then e^100 is a very large number.

Example

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

I = CImage:new()

-- create a new CImage

I:Open(sPath)

-- load the image from a file named sPath

I:Exp()

-- Exponentiate each pixel

Related Topics

Powa

Log

Log10

Pow

CImage class