'lo,

I've written a tiny script that's supposed to make a bunch of .png files
darker. The scheme-code works fine in the script-fu console, doesn't
produce any error in batch-mode, but when executed in batch-mode, the file
is not update at all (modification time not changed), while in the
graphical script-fu console, everything works perfect. Weird. Did I do
something wrong here (obviously)?

My script (also in attachment):

##### CUT #####
#! /bin/sh
#
#  -wvh- darken v2: darkens pngs given on command-line
#

filename="/home/wouter/pix/b1.png"

gimp --verbose -c -d -s -i -b "                                         \
                                                                        \
(define (darken filename)                                               \
  (let* ((img (car (gimp-file-load 1 filename filename)))               \
         (drw (car (gimp-image-active-drawable img)))                   \
        )                                                               \
                                                                        \
    (gimp-hue-saturation drw 0 0 -50 -100)                              \
    (file-png-save 1 img drw filename filename 0 1 0 0 0 0 0)           \
  )                                                                     \
)                                                                       \
                                                                        \
(darken \"$filename\")                                                  \
" '(gimp-quit 0)'

ls -l $filename
##### CUT #####

If anybody can explain why this does work in the console but not in batch
mode (without error), go ahead... (is there no option to trace back what's
really happening there?)


Thanks,

/ wouter


PS: GIMP version 1.2.1 / linux kernel 2.4.6

|};:=====---     ---=====:;[ Wouter Van Hemel ];:=====---     ---=====:;{|
|
|   -It's hard to be a Friday kind of person in a Monday kind of world-
|
| [ phone +32 (0)496 840647 ] [ fax +32 (0)16 834099 ] [ pgp 0xAA5412F0 ]
| [ homepage http://wouter.is.dreaming.org/ ] [ email [EMAIL PROTECTED] ]
|};:=====---     ---=====:;[ --===|>--<|===-- ];:=====---     ---=====:;{|
#! /bin/sh
#
#  -wvh- darken v2: darkens pngs given on command-line
#

filename="/home/wouter/pix/b1.png"

gimp --verbose -c -d -s -i -b "                                         \
                                                                        \
(define (darken filename)                                               \
  (let* ((img (car (gimp-file-load 1 filename filename)))               \
         (drw (car (gimp-image-active-drawable img)))                   \
        )                                                               \
                                                                        \
    (gimp-hue-saturation drw 0 0 -50 -100)                              \
    (file-png-save 1 img drw filename filename 0 1 0 0 0 0 0)           \
  )                                                                     \
)                                                                       \
                                                                        \
(darken \"$filename\")                                                  \
(print \"hello\") \
" '(gimp-quit 0)'

ls -l $filename

Reply via email to