Hi all,
I'm trying to get this simple unsharp masking batch script to work. I have many .tif files, and I'd like to unsharp mask them in one go.
https://www.gimp.org/tutorials/Basic_Batch/
I've made the scm file, copied it over into the scripts directory. This is the scm file content:
Next, I open command prompt, move to the folder with the images and run the following command:
Gimp does open up and all the tif files are opened one after another, but then gimp tries to load files named 5.0, 0.5 and 0. This results in an error message.
It says something like this:
Opening 'C:\Users\cxk340\for_gimp_processing\5.0' failed: No such file or directory
Any help would be appreciated. Thanks!
I'm trying to get this simple unsharp masking batch script to work. I have many .tif files, and I'd like to unsharp mask them in one go.
https://www.gimp.org/tutorials/Basic_Batch/
I've made the scm file, copied it over into the scripts directory. This is the scm file content:
Code:
(define (batch-unsharp-mask pattern
radius
amount
threshold)
(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-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)))))
Next, I open command prompt, move to the folder with the images and run the following command:
Code:
gimp -b '(batch-unsharp-mask "*.tif" 5.0 0.5 0)' -b '(gimp-quit 0)'
Gimp does open up and all the tif files are opened one after another, but then gimp tries to load files named 5.0, 0.5 and 0. This results in an error message.
It says something like this:
Opening 'C:\Users\cxk340\for_gimp_processing\5.0' failed: No such file or directory
Any help would be appreciated. Thanks!