Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run batch command line in Fu console beginning with 'gimp'
#5
As ofnuts states syntax between linux and Windows.

This works in linux batch-autocrop.scm in Gimp script folder
Code:
(define (batch-autocrop pattern)


 (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-autocrop RUN-NONINTERACTIVE image drawable)
           
            (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
            (gimp-image-delete image))
          (set! filelist (cdr filelist)))))

and in a terminal
Code:
 gimp  -i -b '(batch-autocrop "*.png" )' -b '(gimp-quit 0)'

Basically what is given in the Gimp docs.

Tried all ways in a Win10 VM with no success, forward slashes / double (escape) slashes / various quotes). Script runs, nothing happens.

How many files do you need to process ? The Gimp BIMP batch plugin works (autocrop is 'other' Gimp procedure)
Reply


Messages In This Thread
RE: Run batch command line in Fu console beginning with 'gimp' - by rich2005 - 09-24-2022, 01:27 PM

Forum Jump: