[Gimp-user] Script-fu gimp-file-save-thumbnail function
Kevin Cozens
kevin at ve3syb.ca
Fri Jan 4 08:50:45 PST 2008
Martin Bradley wrote:
> (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 img filename)
> (print (gimp-file-save-thumbnail img filename))))
> )
[snip]
> SF-VALUE "Image Name" " "
You have an error in your placement of ')'. You have one too few at the end of
the set! line and one too many at the end of the print line.
You have the wrong number of arguments in the call to gimp-file-save. You can
see the list of required arguments in the Procedure Browser. I don't think you
need the file save since you haven't changed the file since it was loaded.
The SF-VALUE in the register block should be SF-FILENAME.
> Later on I edited the function to be as shown below.
[snip]
> (when (gimp-file-save-thumbnail img)
> (gimp-message "thumbnail saved?")))))
Where did you come up with 'when'? There is no such function in Script-Fu.
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg
More information about the Gimp-user
mailing list