;batch resize (define (script-fu-batch-resize-this pattern resize) (let* ((filelist (cadr (file-glob pattern 1)))) (while filelist (let* ((filename (car filelist)) (image (car (gimp-file-load 1 filename filename))) (drawable (car (gimp-image-get-active-layer image))) (width (car (gimp-image-width image))) (height (car (gimp-image-height image)))) (set! width (* width resize)) (set! height (* height resize)) (gimp-image-scale image width height) (gimp-file-save 1 image drawable filename filename) (gimp-image-delete image) ) (set! filelist (cdr filelist)) ) ) ) (script-fu-register "script-fu-batch-resize-this" "/Script-Fu/Utils/Batch resize this" "Resize all files that match the search pattern" "Michael Rost" "2006, Michael Rost" "Rev A - July 02, 2006" "" SF-VALUE "Search String" "" SF-VALUE "Resize Constant" "0.5" )
As I mentioned, this script, since I've registered it with GIMP, runs well from the menu. My issue is that I can't get it to run from the Windows XP command line. I can run GIMP from the command line and even add some switches, such as gimp-2.2 -s to suppress the splash screen. But when I try gimp-2.2 -i -b '(script-fu-batch-resize-this "i:\\pictures\\resize\\*.jpg" .5)' '(gimp-quit 0)' the files aren't resized. When I monitor the task manger, I see gimp-2.2.exe and script-fu.exe load as processes. I also see a second instance of script-fu.exe load, but it terminates after a few seconds. At this point nothing has happened to my files and I have to manually end the gimp-2.2.exe and script-fu.exe processes.
So my question is if the batch processing functionality is not built into the win32 version of GIMP or perhaps I need to access it in a different way. I suppose I can always run scripts from the GIMP menu, but it seems much more elegant and correct to run them from a command line.
My questions + 1 is I've seen RUN-NONINTERACTIVE as an input to a procedure, but my documentation suggests that this input should be an integer which works fine. What's the preferred or correct method?

Help










