I am working on developing a scripting capability generated by GIMP choices. Right now, I have made progress, but not in a native GIMP dialect. For this, I wish to use script-fu.
I have set up a VERY simple script-fu script. It simply copies a file from one filename to another. If I invoke this from the console from inside GIMP (Filters-Script-fu->Console), the script runs fine. It copies the file. If I attempt to run the script from a Windows console window, the script executes, but does not complete. I run the script as:
gimp-2.8 -i --verbose -b ‘(PAT-simple-copy “namein” “nameout”)’ -b ‘(gimp-quit 0)’
The script runs along. The GIMP output window opens, I get a number of messages, and at the end I get 2 lines:
batch command executed successfully
But the final file does not appear.
Here is the script:
(define (PAT-simple-copy fnmi fnmo)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE fnmi fnmi)))
(drawable (car (gimp-image-get-active-layer image))))
(gimp-file-save RUN-NONINTERACTIVE image drawable fnmo fnmo)
(gimp-image-delete image)
))