[Gimp-user] Script-fu gimp-file-save-thumbnail function
Martin Bradley
martsbradley at btinternet.com
Fri Jan 4 14:35:58 PST 2008
Hi Folks,
>You have an error in your placement of ')'.
That was because I thought set was used similar to (let ..)
>I don't think you need the file save since you haven't changed the file since it was loaded.
I have corrected the arguments. I saved the file first because
gimp-file-save-thumbnail documentation suggested to do so. I've since
removed it.
>The SF-VALUE in the register block should be SF-FILENAME.
Yes, had already manage to correct this.
> Where did you come up with 'when'? There is no such function in Script-Fu.
I'd been slowly trying to learn Common Lisp and thought that Script-Fu had it.
Here is the scheme coding tutorial I was using, most likely the wrong
thing to be reading.
http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-1.html#node_toc_node_sec_4.1
(define (script-fu-create-thumb filename)
(let* ((img 0))
;; car needed here because gimp functions return values as lists
(set! img (car (gimp-file-load 1 filename filename)))
(gimp-file-save-thumbnail img filename)))
(script-fu-register "script-fu-create-thumb"
"<Toolbox>/Xtns/Script-Fu/Utils/Thumbnail..."
"Thumbnail Image"
"Marty Bradley"
"Marty Bradley"
"Dec 2007"
""
SF-FILENAME "Image Name" " ")
thank you,
Martin
More information about the Gimp-user
mailing list