Undo/Redo for images
HiI was wondering if someone knows where to start on a undo/redo function for images? Right now I try to store the image as a backup. But when I apply a function/filter, and then repaint my component, the backup image is not drawn.All suggestions appreciated!
[287 byte] By [
deeflexa] at [2007-11-27 3:16:42]

# 1
at every process make a new temp image to save the current image.
keep the temp image as you go along the image editing process.
the algorithm will automatically do that at every applied process you do.
with that way you have a one step undo.
respectively follow the same for redo. it will also be one step.
alternatively use an array to store for more steps.
gmfa at 2007-7-12 8:19:17 >

# 2
javax.swing.undo package can undo any Object's modify.you said that you stored a backup,may be you not clone the object but only backup a Reference,after do some filter,the backup reference is also modified.