Hi everybody ! I have made a script to resize picture... but it doesn't work anymore, I have change something but I don't remember what... Can someone help me? Thanks a lot !
Jeff Here is my code : (define (script-fu-image-resize filename f-width f-height f-quality) (let* ( (img 0) (drw 0) (height1 0) (width1 0) (fileparts (strbreakup filename ".")) ) (set! img (car (file-jpeg-load 1 filename filename))) (set! height1 (car (gimp-image-height img))) (set! width1 (car (gimp-image-width img))) (if (< height1 width1) (begin (set! f1-height f-height) (set! f1-width f-width) ) ) (if (> height1 width1) (begin (set! f1-height f-width) (set! f1-width f-height) ) ) ;; set image resolution to 72dpi (gimp-image-set-resolution img 72 72) ;; create 'full-size' image (gimp-image-scale img f1-width f1-height) ;; also flatten image to reduce byte storage even further (set! drw (car (gimp-image-flatten img))) ;; save at quality level of .75 (gimp default) - saves storage (file-jpeg-save 1 img drw (string-append (car fileparts) "-mini.jpg") (string-append (car fileparts) "-mini.jpg") f-quality 0 0 0 " " 0 1 0 1) ) ) _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user