2

I want to export all open file from gimp into png format, but I got errors about file : unbound variable: filename

This is the script :

(define (script-fu-save-all-images)
(let* ((i (car (gimp-image-list)))
     (image))
(while (> i 0)
  (set! image (vector-ref (cadr (gimp-image-list)) (- i 1)))
  (gimp-file-save RUN-NONINTERACTIVE
                  image filename filename
                  (car (gimp-image-get-active-layer image))
                  (car (gimp-image-get-filename image))
                  (car (gimp-image-get-filename image)))
  (gimp-image-clean-all image)
  (set! i (- i 1))))) 
  (script-fu-register  "script-fu-save-all-images"
  "<Image>/File/Save All Images"
  • 1
    Nto the compolete answer, neither will it help with the scheme (script-fu) specific error you are getting - but check this question to see how to export a GIMP image to a png file programatically: http://stackoverflow.com/questions/26803732/how-do-i-save-export-all-layers-with-gimps-script-fu/28414662#28414662 – jsbueno Apr 20 '15 at 00:30
  • The information here might also be of some help: http://graphicdesign.stackexchange.com/questions/50896/gimp-export-layer-mask-as-png/50951#50951 – jsbueno Apr 20 '15 at 00:32
  • The main goal is to take all tab's open with images. I don't know how to deal with this , but can be reat backup way and planning tool. – Cătălin George Feștilă Feb 24 '16 at 05:42
  • @CătălinGeorgeFeștilă you have rolled this back to the misleading initial tag - you are not writing Python code – Michael Schumacher Jan 10 '18 at 21:30

0 Answers0