CImage:Blendx CImage:Chs

CImage:Byteswap


The Byteswap method swaps the byte within the image pixels.

Syntax

bResult = CImage:Byteswap()

Remarks

The Byteswap operation can be needed when exchanging images across different computer architecture that store numbers with opposite byte orders.

Example

The following script fragment loads an image from the file sPath, swaps the pixel byte order, and saves the result back to the file:

 

I = CImage:new()

-- create a new CImage

I:Open(sPath)

-- load the image from a file named sPath

I:Byteswap()

-- perform the operation

I:Save()

 

Related Topics

CImage