script: round-corners
This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
script: round-corners | John Dey | 14 Jun 16:57 |
script: round-corners | John Dey | 14 Jun 20:32 |
script: round-corners | Sven Neumann | 14 Jun 23:43 |
script: round-corners | John Dey | 15 Jun 02:04 |
script: round-corners | saulgoode@flashingtwelve.brickfilms.com | 15 Jun 02:16 |
script: round-corners | John Dey | 15 Jun 02:29 |
script: round-corners | saulgoode@flashingtwelve.brickfilms.com | 15 Jun 03:28 |
script: round-corners | Sven Neumann | 15 Jun 23:51 |
script: round-corners | John Dey | 15 Jun 02:16 |
script: round-corners
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:
robo4@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
robo4@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)
robo4@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)))
script: round-corners
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:
robo4@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
robo4@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)
robo4@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)))
script: round-corners
On Mon, 2010-06-14 at 10:57 -0400, John Dey wrote:
robo4@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
script: round-corners
On Jun 14, 2010, at 5:44 PM, Sven Neumann wrote:
On Mon, 2010-06-14 at 10:57 -0400, John Dey wrote:
robo4@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)))
script: round-corners
On Jun 14, 2010, at 5:44 PM, Sven Neumann wrote:
On Mon, 2010-06-14 at 10:57 -0400, John Dey wrote:
robo4@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
script: round-corners
Quoting John Dey :
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.
script: round-corners
On Jun 14, 2010, at 8:16 PM, saulgoode@flashingtwelve.brickfilms.com wrote:
Quoting John Dey :
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
script: round-corners
Quoting John Dey :
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 ...
When a Script-fu calls another Script-fu, a run-mode should not be specified (only PDB calls require a run-mode, and SF calling SF bypasses the PDB).
script: round-corners
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