I'm writing my first script-fu. It creates a bunch of layers, and
draws a gradient into each. I have checked that my calls to
gimp-blend are correct by repeating them manually in the console,
and when I do that, they look fine. But the result of running my
script is mixed: on some layers, the gradient looks as expected, on
some it looks slightly off, and on some, it looks very corrupted.
Am I missing something important, or falling afoul of a gimp bug?
My script is below. I started the gimp, created a new image, and
ran my script-fu via the menus. The resultant image is at
My gimp is 1.2.3, from the Debian gimp1.2 1.2.3-2 package, running
on the Debian "testing" distribution.
One other question: after my script-fu runs, the layers dialog box
is not updated, until I go and reselect the image from the
drop-down. Is there a way to fix that?
Thanks for any help,
(Email Cc: appreciated)
(define (script-fu-encroaching-shadow image shadow-width shadow-step)
(define (make-layers shadow-left)
(if (> (+ shadow-left shadow-width) 0)
(let ((layer (car (gimp-layer-new
(car (gimp-image-width image))
(car (gimp-image-height image))
RGBA_IMAGE "new layer" 100 NORMAL))))
(gimp-image-add-layer image layer -1)
FG-TRANS NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0
(+ shadow-left shadow-width) 0
(cons layer (make-layers (- shadow-left shadow-step))))))
(make-layers (car (gimp-image-width image)))
"Make a shadow cross the image"
"May 5, 2002"
SF-IMAGE "Image" 0
SF-VALUE "Shadow width" "1000"
SF-VALUE "Shadow step" "100")
Gimp-developer mailing list