CImage:Reorient
The Reorient method performs one of a variety of reorientation transformations on an image.
bResult = CImage:Reorient( method, bResize=false ) |
method is the operation code (see Remarks).
bResize controls whether the image shape is changed by the transformation.
On success, this method returns true.
On failure, this method returns false.
This method is a single function that embodies the functionality or Hflip, Vflip, Rot90, Rot180, Rot270, and Transpose. Using this method avoids constructing a if...elseif table when the method is unknown or several transformations are applied in succession. The methods are defined in the following table:
Reorient Methods
Operation |
Method |
Description |
1 |
Horizontal flip |
|
2 |
Vertical flip |
|
3 |
Rotate 90 degrees |
|
4 |
Rotate 180 degrees |
|
5 |
Rotate 270 degrees |
|
6 |
Flip about main diagonal
|
If the optional bResize argument is omitted or set to false, the image retains its original number of columns and rows.
Suppose that a CImage I exists. The following script rotates the image 180 degrees, then flips it horizontally:
|
-- perform 180 degree rotation |
|
-- perform horizontal flip |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.