Re: [Gimp-user] script: round-corners

2010-06-15 Thread Sven Neumann
On Mon, 2010-06-14 at 20:04 -0400, John Dey wrote:

 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)))

You need to flatten the image after you've run the round-corners script
of course.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script: round-corners

2010-06-14 Thread John Dey
Hi,

I noticed that I had left out the RUN-NONINTERACTIVE in the 
script-fu-round-corners command.  When I added and reran I get the message 
batch command experienced an execution error.

John
On Jun 14, 2010, at 10:57 AM, John Dey wrote:

 Hi everybody,
 
 I have a slew of jpg pictures that I would like to round corners and place a 
 drop shadow on.  I google'ed and am at an impasse.  I need help.  I have 
 provided some of the details below.  Thanks in advance for you assistance.
 
 Details:
 
 ro...@robo4:~/Desktop$ uname -a
 Linux robo4 2.6.31-21-generic #59-Ubuntu SMP Wed Mar 24 07:28:27 UTC 2010 
 x86_64 GNU/Linux
 
 ro...@robo4:~/Desktop$ gimp -v
 GNU Image Manipulation Program version 2.6.7
 
 using GEGL version 0.0.22 (compiled against version 0.0.22)
 using GLib version 2.22.3 (compiled against version 2.22.2)
 using GTK+ version 2.18.3 (compiled against version 2.18.3)
 using Pango version 1.26.0 (compiled against version 1.26.0)
 using Fontconfig version 2.6.0 (compiled against version 2.6.0)
 
 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)))
 
 ___
 Gimp-user mailing list
 Gimp-user@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script: round-corners

2010-06-14 Thread Sven Neumann
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


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script: round-corners

2010-06-14 Thread John Dey

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


Re: [Gimp-user] script: round-corners

2010-06-14 Thread John Dey

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,

I just looked at the flatten command that was added and think I had detected an 
error.  I tried:

 (set! drawable (car (gimp-image-flatten image)))

Unfortunately, the script still will not execute without an error.

John
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script: round-corners

2010-06-14 Thread saulgoode
Quoting John Dey js...@optonline.net:

 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:
 :
 :
  (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)

You need to flatten your image AFTER running round-corners.

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script: round-corners

2010-06-14 Thread John Dey

On Jun 14, 2010, at 8:16 PM, saulgo...@flashingtwelve.brickfilms.com wrote:

 Quoting John Dey js...@optonline.net:
 
 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:
 :
 :
 (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)
 
 You need to flatten your image AFTER running round-corners.

Saul,

Thanks for your suggestion.  I moved the flatten command but the script still 
doesn't execute.

Here I am now:

(define (round-corners filein fileout)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filein filein)))
   (drawable (car (gimp-image-get-active-layer image
 (script-fu-round-corners RUN-NONINTERACTIVE
 image drawable 15.0 TRUE 8.0 8.0 15.0 TRUE FALSE)
 (set! drawable (car (gimp-image-flatten image)))
 (gimp-file-save RUN-NONINTERACTIVE image drawable fileout fileout)
 (gimp-image-delete image)))

John
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user