CImageSet:Copy


The Copy method duplicates the CImageSet and returns the new copy.

Syntax

CImageSet = CImageSet:Copy()

Example

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

-- create a CImageSet

I = new_image()

-- 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 canceling the Open dialog

  I:Open(sPath)

-- load the image

  S:Append( I )

-- add the CImage to the set

end

 

T = S:Copy

-- create a duplicate CImageSet T

Related Topics

CImageSet class, CImage class


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