;; batch-unsharp-mask.scm -- apply unsharp-mask on a set of files ;; simple batch script for GIMP 2.2 ;; ;; call it from the command-line using a line like the following: ;; gimp -i -b "(batch-unsharp-mask \"*.png\" 5.0 0.5 0)" "(gimp-quit 0)" ;; ;; This script uses the file-glob plug-in which is not available in GIMP 2.0. (define (batch-unsharp-mask pattern radius amount threshold) (let* ((filelist (cadr (file-glob pattern 1)))) (while filelist (let* ((filename (car filelist)) (image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (drawable (car (gimp-image-get-active-layer image)))) (plug-in-unsharp-mask RUN-NONINTERACTIVE image drawable radius amount threshold) (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename) (gimp-image-delete image)) (set! filelist (cdr filelist)))))