GIMP Version: 2.10.14
Operating System: Windows
OS Version: 10
GIMP Experience: Intermediate Level
List any relevant plug-ins or scripts:goode-mirror-duplicates.scm
Hello, I just discovered batch scripts today for the first time through the official GIMP Batch Mode guide.
I'm looking to do a multiple file operation of thousands of images to mirror them (mirroring the whole image horizontally, yielding an image twice the width in the end). I found a working scm script which is capable of doing this within the GIMP GUI, "goode-mirror-duplicates.scm," which seems like a great start, but I have been trying to figure out how to apply it automatically to a directory of files with no luck. So far, I have attempted to call it from a separate scm file which is just a modified version of the 2nd code in the guide I mentioned.
(define (batch-mirror-dup pattern iterations horizontal vertical workcopy)
(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))))
(script-fu-mirror-dup RUN-NONINTERACTIVE
image drawable iterations horizontal vertical workcopy)
(gimp-file-save RUN-NONINTERACTIVE
image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))
And running it from cmd like follows:
gimp-2.10 -i -b '(batch-mirror-dup "*.png" 1 TRUE FALSE FALSE)' -b '(gimp-quit 0)'
When running the batch above, nothing happens. CMD simply returns to a new line for me to enter another command. This is my first time with this, and I'm not sure what to do. Any help is appreciated.
EDIT: See post below