On Jun 14, 2010, at 5:44 PM, Sven Neumann wrote:
> On Mon, 2010-06-14 at 10:57 -0400, John Dey wrote:
>> ro...@robo4:~/Desktop$ gimp -i -b '(round-corners "test.JPG" "test2.JPG")'
>> -b '(gimp-quit 0)'
>> batch command executed successfully
>> test2.JPG is created but the corners are not rounded and there is no drop
>> (define (round-corners in-filename out-filename)
>> (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE in-filename
>> (drawable (car (gimp-image-get-active-layer image))))
>> (script-fu-round-corners image drawable 15 TRUE 8 8 15 TRUE FALSE)
>> (gimp-file-save RUN-NONINTERACTIVE image drawable out-filename
>> (gimp-image-delete image)))
> You need to add a call to gimp-image-flatten to your script and make
> sure that you save the drawable that is created by this call.
Thanks for the response. I had added the flatten command today but the script
still has an execution error. Here is what I have tried:
(define (round-corners filein fileout)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filein filein)))
(drawable (car (gimp-image-get-active-layer image))))
(set! drawable (gimp-image-flatten image))
image drawable 15 TRUE 8 8 15 TRUE FALSE)
(gimp-file-save RUN-NONINTERACTIVE image drawable fileout fileout)
Gimp-user mailing list