CImageView:SaveUndoAll


The SaveUndoAll method saves an "undo" copy of all images of the CImageSet displayed in the current CImageView window.

Syntax

bResult = CImageView:SaveUndoAll()

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

This method saves an undo copy of all images in the CImageView window. All images can later be restored, if desired, using the UndoAll method.

Example

The following script attaches an image window on the desktop and saves an undo copy for all of its images. The images are changed by adding 30.5 to each pixel:

V = attachlist_imageview()

-- attach an image window from a list of windows on the desktop

V:SaveUndoAll()

-- save an undo copy of all images in the window

for n = 1, V:Count() do

-- for each image in the window

  I = V:GetImage(n)

-- get its CImage object

  I:Add(30.5

-- add 30.5 to al pixel values

end

 

V:UndoAll()

-- restore all images to their state before adding 30.5.

Related Topics

CImageView, Undo, SaveUndo, UndoAll, Display, CImage class


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