[Gimp-user] batch mode debugging
Milos Prudek
prudek at bvx.cz
Sun Sep 9 06:29:15 PDT 2007
On Sunday 09 of September 2007 14:53:52
saulgoode at flashingtwelve.brickfilms.com wrote:
> RUN-NONINTERACTIVE is not a valid parameter for 'script-fu-fuzzy-border'.
You are right. Unfortunately when I remove RUN-NONINTERACTIVE, the script
fails anyway, this time with this error message:
(jpeg:14957): LibGimp-CRITICAL **: gimp_drawable_get: assertion `width > 0 &&
height > 0 && bpp > 0' failed
/usr/lib/gimp/2.0/plug-ins/jpeg: fatal error: Segmentation fault
I wrote a simple Script-Fu script integrated into "right-click context menu"
for an opened picture. And it works perfectly.
But the scripts I posted do not work. They should work in batch mode. Why do
not they? The syntax of script-fu-fuzzy-border is exactly the same.
Here is the offending script again:
(define (fuzzy-border-single filename)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(script-fu-fuzzy-border image drawable '(255 255
255) 120 TRUE 9 FALSE 0 FALSE TRUE)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image)))
And it is called by this command:
gimp -i -b '(fuzzy-border-single "foo.jpg")' '(gimp-quit 0)'
--
Milos Prudek
More information about the Gimp-user
mailing list