CImage:Copy
The Copy method makes a copy of the CImage object, including its encapsulated image. Therefore the CImage should be terminated using Close or delete when you are done using it.
CImage = CImage:Copy() |
On success, this method returns a new CImage object containing an independent copy of the image. In place of CImage, use the name of the actual object to be copied (see Example).
On failure, this method returns nil.
Suppose an image file exists with a full path named sPath. The script below shows the image being opened and copied:
|
-- create a CImage object |
|
-- open the image from path sPath. |
|
-- if not opened, then... |
|
-- leave the script, etc. |
|
-- end of if block |
|
-- create a new CImage named I2 |
|
-- do something |
|
-- when done with I, remove it from memory |
|
-- when done with I2, remove it from memory |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.