CImage:Recip
The Recip method computes the reciprocal of the pixel values.
bResult = CImage:Recip() |
Usually, the image should have real type pixels before using this method. The pixel data type can be tested and changed using IsReal and SetDatatype . See Data Types for more information.
The following script fragment loads an image from the file sPath, computes the reciprocal, and saves the result back to the file:
|
-- create a new CImage |
|
-- load the image from a file named sPath |
|
-- perform the operation |
|
|