1

I'm trying to make my first steps with Gimp batch processing, but I'm stuck at the very beginning. I'm getting this error:

z80crews-iMac:~ z80crew$ /Applications/GIMP-2.10.app/Contents/MacOS/gimp -i -b '(do-it "france.png" "spain.png")' -b '(gimp-quit 0)'
batch command experienced an execution error:
Error: eval: unbound variable: do-it

do-it is the name of my function to execute. This function is defined in a file that's stored in ~/.gimp-2.10/scripts.

z80crews-iMac:~ z80crew$ cat ~/.gimp-2.10/scripts/gimp-combine-images.scm
(define (do-it fname-one fname-two)
)
z80crews-iMac:~ z80crew$ /Applications/GIMP-2.10.app/Contents/MacOS/gimp -v
GNU Image Manipulation Program Version 2.10.12

Additional info: Defining do-it right on the command line works:

z80crews-iMac:~ z80crew$ /Applications/GIMP-2.10.app/Contents/MacOS/gimp -i -b '((define (do-it fname-one fname-two)) (do-it "france.bigcities.png" "france.cities.png")' -b '(gimp-quit 0)'
batch command executed successfully

Other things I tried:

  • I tried to pass the script as an argument to gimp.
  • I opened the Gimp application and stored my script fu script in the directories that are shown in Preferences > Folders > Scripts.

I'm obviously missing something easy, but I can't find out what it is.

z80crew
  • 1,150
  • 1
  • 11
  • 20

1 Answers1

0

It seems this is the way to go:

I opened the Gimp application and stored my script fu script in the directories that are shown in Preferences > Folders > Scripts.

This time I launched and closed GIMP (the application with the GUI) after having put my script in /Users/USERNAME/Application Support/GIMP/2.10/scripts. This was the first path that GIMP lists in Preferences > Folders > Scripts.

z80crew
  • 1,150
  • 1
  • 11
  • 20