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() |
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 |