new_imageset CImageSet:Copy

CImageSet:Append


The Append method appends, or "adds" a CImage to the end of the image set.

Syntax

CImageSet:Append( CImage )

Remarks

This method adds a CImage at the end of the set. In comparison, the Insert method adds a CImage at a position in the image set prior to a numerical index.

Example

The following script uses a loop to interactively append images until you click [Cancel] on the Open dialog. Note that the images are not closed after being opened, so they are available for use.

 

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 image to the end of the set

end

 

Related Topics

CImageSet class, Insert, Remove


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