[Gimp-user] batch mode debugging

Milos Prudek prudek at bvx.cz
Sun Sep 9 11:49:09 PDT 2007


> It is my understanding that ALL Script-fus are run non-interactively.

script-fu-fuzzy-border can run interactively. It is available in 
Right-click/Script-Fu/Decor/ menu in GIMP. It asks interactively for its 
parameters. Is it an interactive run?

> not have the same 'drawable' ID as before the flattening. If you do a
> second 'gimp-image-get-active layer' after flattening then you will be
> passing the proper 'drawable' ID to the save plug-in.

OK. I tried to implement your idea:

 (define (fuzzy-border-single filename)
   (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
          (drawable (car (gimp-image-get-active-layer image))))

 (script-fu-fuzzy-border image drawable '(255 255
255) 120 TRUE 9 FALSE 0 FALSE TRUE)
     (set! (drawable (car (gimp-image-get-active-layer image))))
     (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
     (gimp-image-delete image)))

But it outputs "batch command: experienced an execution error."

I learned the basics of Scheme yesterday. Is this some kind of scope error? Am 
I changing a different "drawable" variable?

-- 
Milos Prudek


More information about the Gimp-user mailing list