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 loads an image from the file sPath, swaps the pixel byte order, and saves the result back to the file:

 

I = new_image()

-- 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 class


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.