Returns whether a redo operation is currently available.
True if redo is available, false otherwise.
Returns whether an undo operation is currently available.
True if undo is available, false otherwise.
As the instance is backed by a native resource, it should be disposed when it is no longer needed.
This method will release the native resource.
As a recommended alternative since the class implements AsyncDisposable one can use 'await using' syntax to ensure the resource is disposed of automatically.
If neither is used, the resource will be released when the instance is garbage collected which is not recommended.
A promise that resolves when the instance is disposed.
Re-applies the last undone cleanup operation.
Image with last undone operation re-applied, or current image if no operations to redo.
Restores the original image, and clears the undo/redo history.
The original, unmodified image.
cleans the masked areas up.
Specifies the regions to clean up. Non-zero pixels indicate the region to be cleaned up.
Cleanup result with status and the cleaned up image.
Reverts the last cleanup operation.
Image with last operation reverted, or current image if no operations to undo.
StaticcreateInitializes the document cleanup.
The image to process.
The document cleanup configuration.
Instance of DocumentCleanup.
API for document cleanup. *
Example
Since the class is backed by native resources and implements
AsyncDisposableit's highly recommended to use theawait usingsyntax when an instance is created to ensure the resource is disposed automatically:Alternatively, one can explicitly call dispose method to release the native resource. If neither is used, the resource will be released when the instance is garbage collected which is not recommended.