As ofnuts states syntax between linux and Windows.
This works in linux batch-autocrop.scm in Gimp script folder
and in a terminal
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)
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)