maybe I am doing something wrong with the script, but each time that I run the .bat file I get a command window that ends up indicating the following when attempting to process an image.
The .bat file is in the directory that the images are in so all I am trying to do is just process and overwrite but error prevents any processing from happening.
when I run the following from the command line or .bat file
"C:\Program Files\GIMP-2.0\bin\gimp-2.6.exe" -i -f -d --verbose -b "(batch_capnhud_wave_sharp \".jpg\" \".\")" -b "(gimp-quit 0)"
i experience
No batch interpreter specified, using the default 'plug-in-script-fu-eval'.
script-fu.exe-Warning: processing-th_alps_60266_6743902.jpg
batch command experienced an execution error
EXIT: gimp_exit
EXIT: gimp_real_exit
Writing 'C:\Documents and Settings\Owner\.gimp-2.6\templaterc'
Writing 'C:\Documents and Settings\Owner\.gimp-2.6\parasiterc'
Writing 'C:\Documents and Settings\Owner\.gimp-2.6\unitrc'
EXIT: batch_exit_after_callback
(Type any character to close this window)
and script
;
; Version 1.0 07.02.2012 for capnhud
; See http://gimpchat.com/viewtopic.php?f=8&t=3701
; command line for Windows:
; "C:\Program Files\GIMP-2.0\bin\gimp-2.6.exe" -i -f -d --verbose -b "(batch_capnhud_wave_sharp \".jpg\" \"sharpened\")" -b "(gimp-quit 0)"
(define selffilename "\n- batch_capnhud_wave_sharp.scm")
; Batch mode wrapper
(define (batch_capnhud_wave_sharp file_extension destination_directory)
(let*
(
(destination_file "")
(varFileList (cadr (file-glob (string-append "*" file_extension) 1))) ; make a list of all the files that match the file extension
; Adjust these values to suit
;(amount 0.3)
(radius 0.5)
(radius 1.0)
(luminance TRUE)
)
(gimp-message-set-handler ERROR-CONSOLE)
(if (not (file-exists? destination_directory))
(error (string-append "Error: directory " destination_directory " doesn't exist"))
(if (= (file-type destination_directory) FILE-TYPE-DIR)
()
(error (string-append destination_directory " is not a directory"))
)
)
; loop through all the files in the list
(for-each
(lambda (filename)
(let* (
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) ; load the image
(drawable (car (gimp-image-flatten image)))
)
(gimp-message (string-append "processing-" filename))
; Thing to do goes here
(plug-in-wavelet-sharpen RUN-NONINTERACTIVE image drawable amount radius luminance)
(set! destination_file (string-append destination_directory DIR-SEPARATOR filename))
(gimp-file-save RUN-NONINTERACTIVE image drawable destination_file destination_file)
(gimp-image-delete image) ; unload the image
)
)
varFileList
)
)
)