>Von: Gene Smith <[EMAIL PROTECTED]>
> How do I put the call to gimp_image_flatten() in my script. Everything I 
> try still gives the "experience an exec error" message. Last thing tried:
> (define (round-corners filename)
>     (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename 
> filename)))
>            (drawable (car (gimp-image-get-active-layer image))))
>       (image (gimp_image_flatten(image)))
>       (script-fu-round-corners RUN-NONINTERACTIVE
>                          image drawable 15 TRUE 8 8 15 TRUE FALSE)
>       (set! drawable (car (gimp-image-get-active-layer image)))
>       (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
>       (gimp-image-delete image)))
"(gimp_image_flatten(image))" is incorrect for a couple of reasons.

First, Script-fu never uses underscores (except for marking strings for
foreign language translation) and these need to be converted to dashes;
therefore the function becomes "gimp-image-flatten".

Second, 'image' should not be within parentheses.

Third, after you perform the flatten, the variable 'drawable' is no
longer valid (flatten creates a new layer). You need to assign the
active layer to 'drawable' AFTER you perform the flatten.

"It is amazing what you can accomplish if you do 
not care who gets the credit." -- Harry S. Truman

Gimp-user mailing list

Reply via email to