CImage:Modx
The Modx method computes the remainder of division by a constant value.
bResult = CImage:Modx( x )
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.
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:
|
-- create a new CImage |
|
-- load the image from a file named sPath |
|
-- perform the operation |
|
|