CImage:Abs
The Abs method replaces the image pixels with their absolute value.
bSuccess = CImage:Abs()
On success, this method returns true
On failure, this method returns false .
The Abs operation changes all pixel values to a positive number. If the pixel type is entirely positive, like "byte" or "ushort", this operation does nothing.
The following script loads an image from the file sPath, computes the absolute value of the pixel values, and saves the result back to the file:
|
-- create a new CImage |
|
-- load the image from a file named sPath |
|
-- perform the operation |
|
|
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.