Dear all,
I have been having difficulty running the following batch script:
; ------------------
; BEGIN SCRIPT
; ------------------
(define (batch-CUPify pattern
image
drawable)
(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))))
; Erode the image
(plug-in-erode 1 image drawable 1 1 0.5 7 128 128)
; Photocopy the image
(plug-in-photocopy 1 image drawable 35.51 0.583 0.342 0.200)
; Erode the image
(plug-in-erode 1 image drawable 1 1 0.5 7 128 128)
; Flush the display
(gimp-displays-flush)
; Save the image
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist))))
)
(script-fu-register "batch-CUPify"
"Batch-CUPify"
"Make an image look like it was scanned to PDF by CUP"
"Sam Kuper"
"Sam Kuper"
"2007"
"GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Layer to process" 0)
; ------------------
; END SCRIPT
; ------------------
I am using GIMP 2.4.1 on Windows XP, and I am trying to run the script by
going to the command prompt, changing to a directory full of .png files I
want to process with the script, and entering the command:
gimp-2.4 -i -b '(batch-CUPify "*.png")' '(gimp-quit 0)'
This gives me the following messages:
"GIMP-Error: Opening 'D:\Documents and
Settings\spk30\Desktop\alison_sl1_dear_fri
end_backup\*.png)'' failed: Invalid argument
GIMP-Error: Opening 'D:\Documents and
Settings\spk30\Desktop\alison_sl1_dear_fri
end_backup\'(gimp-quit' failed: No such file or directory
GIMP-Error: Opening 'D:\Documents and
Settings\spk30\Desktop\alison_sl1_dear_fri
end_backup\0)'' failed: No such file or directory
No batch interpreter specified, using the default 'plug-in-script-fu-eval'.
batch command: executed successfully."
I would be very grateful for any help you can offer.
Many thanks in advance,
Sam
_______________________________________________
Gimp-user mailing list
[email protected]
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user