CImage:Byteswap
The Byteswap method swaps the byte within the image pixels.
bSuccess = CImage:Byteswap()
where
bSuccess is the returned success code. On success it is true, otherwise false.
The Byteswap operation can be needed when exchanging images across different computer architecture that store numbers with opposite byte orders.
The following script loads an image from the file sPath, swaps the pixel byte order, and saves the result back to the file:
|
-- create a new CImage |
|
-- load the image from a file named sPath |
|
-- perform the operation |
|
|