CImage:Mod CImage:Mul

CImage:Modx


The Modx method computes the remainder of division by a constant value.

Syntax

bResult = CImage:Modx( 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.

Remarks

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.

Example

The following script fragment loads an image from the file sPath, computes the remainder relative to 256, and saves the result back to the file:

 

I = CImage:new()

-- create a new CImage

I:Open(sPath)

-- load the image from a file named sPath

I:Modx( 1.0 )

-- perform the operation

I:Save()

 

Related Topics

CImage