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
>> 
>> Comment:
>> 
>> test2.JPG is created but the corners are not rounded and there is no drop 
>> shadow!
>> 
>> (define (round-corners in-filename out-filename)
>>    (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE in-filename 
>>                  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 
>>                    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.
> 
> 
> Sven
> 
> 
Sven,

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))
     (script-fu-round-corners RUN-NONINTERACTIVE
                         image drawable 15 TRUE 8 8 15 TRUE FALSE)
     (gimp-file-save RUN-NONINTERACTIVE image drawable fileout fileout)
     (gimp-image-delete image)))
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to