CImageView:Undo
The Undo method restores a member of the CImageSet displayed in the current CImageView window by replacing it with its undo copy. The target image may be the current displayed image or the CImageSet member at a specific index.
bResult = CImageView:Undo() bResult = CImageView:Undo( 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 restores the target image in the CImageView window to its saved state. The target image must have beed saved either by calling the SaveUndoAll method or by calling SaveUndo for one or more of the images.
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, SaveUndo, SaveUndoAll, UndoAll, Display, CImage class
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.