Hi, I myself had written earlier on the developer list:
On Wednesday 17 November 2004 23:36, Joao S. O. Bueno Calligaris
wrote:
> Meanwhile, a hint on this undo subject for script/plugin writers:
> I found out it to be more eficient in memory usage, if aplicable,
> of course, to create a new image, disable undo in it (I cannont
> tell the difference between freeze/disable so far), and do your
> script stuff in there. When finalizing, copy your resulting
> drawable back to the original image.
>
> gimp_image_undo_group_start won't save your memory.
>
> BTW, some of the included scheme scripts could benefit from this.
>
Since this problem is critical in larger images I've made these
one-liner script-fus and am posting them here. They just add
enable/disable undo menu entries, and are able to spare tens of MBs
of memory on a single run of the "line-nova" script fu in a 640x480
image..
> JS
> -><-
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
(define (script-fu-disable-undo image
drawable)
(gimp-image-undo-disable image)
)
(define (script-fu-enable-undo image
drawable)
(gimp-image-undo-enable image)
)
(script-fu-register "script-fu-disable-undo"
_"<Image>/Edit/Disable Undo"
""
"Joao S. O. Bueno Calligaris (2004)"
"Joao S. O. Bueno Calligaris"
"2004-11-17"
"RGB* INDEXED* GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0)
(script-fu-register "script-fu-enable-undo"
_"<Image>/Edit/Enable Undo"
""
"Joao S. O. Bueno Calligaris (2004)"
"Joao S. O. Bueno Calligaris"
"2004-11-17"
"RGB* INDEXED* GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0)
_______________________________________________
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user