CImage:Chs
The Chs method changes the sign of the pixels in the image.
bResult = CImage:Chs()
The Chs operation changes positive pixel value to negative ones and vice versa. 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, changes the sign 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, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.