RE: [Gimp-developer] how does undo currently work
I wrote some docs about the undo system's operation; try looking around in the doc/ subdirectory. I can't vouch for how accurate they are now, but I don't think the system has changed much since I added the undo history feature. Austin ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] how does undo currently work
Hi, Hunter Peress [EMAIL PROTECTED] writes: Suppose 100 actions are done to an image of size T Would gimp's memory increase by 100T ? it depends on what you are undoing. Only the altered tiles and the necessary meta information to undo the action is stored in the undo system. Salut, Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] how does undo currently work
So whats the approach for this meta information? Will u ever use this meta information to perform the inverse of an operation? When resizing an image u lose pixels, so you would have to store size T in memory. No meta information there really. On Thu, 2002-10-31 at 03:20, Sven Neumann wrote: Hi, Hunter Peress [EMAIL PROTECTED] writes: Suppose 100 actions are done to an image of size T Would gimp's memory increase by 100T ? it depends on what you are undoing. Only the altered tiles and the necessary meta information to undo the action is stored in the undo system. Salut, Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] how does undo currently work
Hi, Hunter Peress [EMAIL PROTECTED] writes: So whats the approach for this meta information? Will u ever use this meta information to perform the inverse of an operation? yes. What do you think we save it for? When resizing an image u lose pixels, so you would have to store size T in memory. No meta information there really. did I say something else? You could help all of us by explaining the reason of your question and by trying to be a little more verbose. I'm not sure if I understood your mail at all. Salut, Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] how does undo currently work
I'll try to clarify for you. Could u explain what the meta information is based on? In order to accomplish an undo, would this meta information be used to perform the inverse of an operation? A situation where I dont think the meta information would make sense would be: when resizing an image (u lose pixels), so I think you would have to keep the former image completely in memory and not rely on meta information to bring it back (via a computation/operation that is an inverse of the original) for the undo. If the above is still not sinking in, it is simply my attempt to try and understand in *further detail* (than your response below) how the undo system works. On Thu, 2002-10-31 at 03:20, Sven Neumann wrote: Hi, Hunter Peress [EMAIL PROTECTED] writes: Suppose 100 actions are done to an image of size T Would gimp's memory increase by 100T ? it depends on what you are undoing. Only the altered tiles and the necessary meta information to undo the action is stored in the undo system. Salut, Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] how does undo currently work
Hi, Hunter Peress [EMAIL PROTECTED] writes: Could u explain what the meta information is based on? In order to accomplish an undo, would this meta information be used to perform the inverse of an operation? for each action the GIMP undo systems stores all of the image data that is invalidated as well as other information about the action. These informations are then used to undo the action later. The exact type of data stored depends on the action that is pushed on the undo stack. A situation where I dont think the meta information would make sense would be: when resizing an image (u lose pixels), so I think you would have to keep the former image completely in memory and not rely on meta information to bring it back (via a computation/operation that is an inverse of the original) for the undo. I guess you are speaking of a crop operation here since an image resize doesn't alter any layer data. An image resize in The GIMP is a good example for an action that is represented solely by meta data: struct _ImageSizeUndo { gint width; gint height; }; This struct can be found in app/undo.c. Unfortunately this code sucks a lot, so take all necessary steps to protect yourself if you decide to take a look. Assuming you meant to speak about cropping an image, or let's say a layer to simplify things a bit, you are basically right. GIMP needs to store the part of the layer that is cut away. It does so by pushing the affected tiles to the undo stack together with the necessary info about how to restore them: struct _ImageUndo { TileManager *tiles; GimpDrawable *drawable; gint x1, y1, x2, y2; gboolean sparse; }; If the above is still not sinking in, it is simply my attempt to try and understand in *further detail* (than your response below) how the undo system works. you still didn't tell us the reasons for your interest in the GIMP undo system. Of course you are free not to speak about it if you don't want to... Salut, Sven ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer