CImageSet:Copy
The Copy method duplicates the CImageSet and returns the new copy.
CImageSet = CImageSet:Copy() |
The following fragment duplicates the image set. Note that the CImage objects are not closed after the loop in this example, so they may be used afterward. They should be closed before exiting the script.
S = CImageSet:new() |
-- create a CImageSet |
I = CImage:new() |
-- create a CImage |
while ( true ) do |
|
local sPath, bOk = GetFileName() |
-- use the Open dialog to get a filename |
if ( not bOk ) then Exit() end |
-- exit the loop after hitting Cancel |
I:Open(sPath) |
-- load the image |
S:Append( I ) |
-- add the CImage to the set |
end |
|
T = S:Copy |
-- create a duplicate CImageSet T |