Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Batch mode?

Help
2011-03-18
2013-05-15
  • Perry Whelan
    Perry Whelan
    2011-03-18

    I just installed and am trying to do some batch processing, but nothing I pass the command line seems to have any effect. Is there a batch mode for OSX?

    As an example: "-i" should yield no interface (this works on linux and windows). But when I execute the following command, it seems to ignore my parameter and the full app loads up:

    (From a bash prompt)
      /Applications/Gimp.app/Contents/MacOS/Gimp -i

    This is my actual full command:
      /Applications/Gimp.app/Contents/MacOS/Gimp -i -b '(batch-sel-gauss "*.jpg" 5.0 18)' -b '(gimp-quit 0)'

    Please advise.

    Regards,
    Perry

     
  • just use

    /Applications/Gimp.app/Contents/Resources/script
    

    instead.

    /A/G/MacOS/Gimp is only some ort of a launcher application to bundle all of GIMP's libraries in a Mac OS X application bundle.

     
  • Perry Whelan
    Perry Whelan
    2011-03-21

    Excellent.

    Thank you,
    Perry

     
  • Perry Whelan
    Perry Whelan
    2011-03-21

    In OSX, I have now placed a batch script (which I used w/ Gimp on Windows & Linux, so I know it works) into the following DIR:

      /Users/meba/Library/Application Support/Gimp/scripts/batch-sel-gauss.scm

    I call it this way:

      /Applications/Gimp.app/Contents/Resources/script -verbose -i -b '(batch-sel-gauss "*.jpg" 5.0 18)'

    It does not execute. In Linux, scripts go into ~/.gimp-2.x. Naturally, I have tried creating this (~/.gimp2.6.11/scripts). No script I try to execute seems to be found. Perhaps I'm not putting it into the correct place, or calling it in the correct way for OSX?

    This is the output I get:

    2011-03-21 00:00:32.464 defaults
    The domain/default pair of (org.x.X11, dpi) does not exist
    INIT: gimp_load_config
    Parsing '/Users/meba/Library/Application Support/Gimp/unitrc'
    Parsing '/tmp/skl/Gimp.app/Contents/Resources/etc/gimp/2.0/gimprc'
    Parsing '/Users/meba/Library/Application Support/Gimp/gimprc'
    gimp_composite: use=yes, verbose=no
    Processor instruction sets: +mmx +sse +sse2 -3dnow -altivec -vis
    INIT: gimp_initialize
    INIT: gimp_real_initialize
    INIT: gimp_restore
    Parsing '/Users/meba/Library/Application Support/Gimp/parasiterc'
    Parsing '/Users/meba/Library/Application Support/Gimp/templaterc'
    INIT: gimp_real_restore
    Parsing '/Users/meba/Library/Application Support/Gimp/pluginrc'
    Starting extension: 'extension-script-fu'
    No batch interpreter specified, using the default 'plug-in-script-fu-eval'.
    batch command experienced an execution error

    The script is as follows:

    (define (batch-noise-reduction pattern
                                   radii
                                   delta)
    (let* ((filelist (cadr (file-glob pattern 1))))
      (while (not (null? filelist))
             (let* ((filename (car filelist))
                    (image (car (gimp-file-load RUN-NONINTERACTIVE
                                                filename filename)))
                    (drawable (car (gimp-image-get-active-layer image))))
               (plug-in-sel-gauss RUN-NONINTERACTIVE
                                  image drawable radii delta)
               (gimp-file-save RUN-NONINTERACTIVE
                               image drawable filename filename)
               (gimp-image-delete image))
             (set! filelist (cdr filelist)))))[/code
    Any ideas?
    Regards,
    Perry
    
     
  • No dot directories are used. Take a look at your log an use

    ~/Libray/Application Support/Gimp

    and its subdirectories.

     
  • Perry Whelan
    Perry Whelan
    2011-03-21

    I have managed to verify that I am in fact executing the script now:

      ~/Libray/Application Support/Gimp/scripts

    I have used the script located here for years, and I just cannot seem to get it to work:

      http://www.miguev.net/blog/en/2007/12/25/batch-noise-reduction-with-the-gimp/

    I am calling it this way:

      /Applications/Gimp.app/Contents/Resources/script -d -f -i -b '(batch-noise-reduction "*.jpg" 5.0 16)' -b '(gimp-quit 0)'

    And get this output:

    find: /Users/meba/Library/Application Support/Gimp/help: No such file or directory
    2011-03-21 09:19:45.249 defaults
    The domain/default pair of (org.x.X11, dpi) does not exist
    batch command executed successfully

    But, it has not acted on the image (at least, it hasn't saved it). When I do the same selective gaussian blur manually, it works, of-course.

    Further help is much appreciated.

    Regards,
    Perry

     
  • Perry Whelan
    Perry Whelan
    2011-03-27

    The script on this (http://www.miguev.net/blog/en/2007/12/25/batch-noise-reduction-with-the-gimp/) page works on Windows & Linux. Would someone be willing to get it to work, in batch mode in OSX, and post the steps taken to do so? I am out of ideas, but want to process a ton of images in just this way :(

    Thank you,
    Perry