CImageView:SaveUndo
The SaveUndo method saves an "undo" copy of an CImage in its current state. The target image may be the current displayed image or the CImageSet member at a specific index.
bResult = CImageView:SaveUndo() bResult = CImageView:SaveUndo( nIndex ) |
nIndex is the index of the target image in the CImageSet, in the range range 1 to Count. If not specified, then the current image is used.
On success, this method returns true.
On failure, this method returns false.
This method saves an undo copy of the target image. The image can later be restored using the Undo method.
Assume that a CImageView exists and is assigned toV. The following script saves an undo copy, changes the image, then restores it:
|
-- create a CImageView object |
|
-- create a CImage |
|
-- use the Open dialog to get a filename |
|
-- load the image |
|
-- display the image in the CImageView |
|
-- save an undo copy of the image |
|
-- add 30.5 to all pixel values. |
|
-- restore the image to its state before adding 30.5. |
CImageView, Undo, SaveUndoAll, UndoAll, Display, CImage class
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.