/ Published in: Lisp
How to use:
gimp -i -b "(batch-cine-photo \"Z:\\\\My\\ Photos\\\\*.jpg\")" -b '(gimp-quit 0)'
gimp -i -b "(batch-cine-photo \"Z:\\\\My\\ Photos\\\\*.jpg\")" -b '(gimp-quit 0)'
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
(define (batch-cine-photo pattern) (let* ( (filelist (cadr (file-glob pattern 1))) (jpgname) (filename) (image) (drawable) ) (while (not (null? filelist)) (set! filename (car filelist)) (gimp-message filename) (set! image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (set! jpgname (car (strbreakup filename "."))) (set! jpgname (string-append jpgname "-mod.jpg")) (set! drawable (car (gimp-image-get-active-layer image))) ;(script-fu-cinema RUN-NONINTERACTIVE image drawable 0 0 0 0) ;(plug-in-unsharp-mask RUN-NONINTERACTIVE image drawable 5.0 0.5 0) (script-fu-cine-photo image 0 0 0 0 0 0) (set! drawable (car (gimp-image-get-active-layer image))) (gimp-file-save RUN-NONINTERACTIVE image drawable jpgname jpgname) (gimp-image-delete image) (set! filelist (cdr filelist)) ) ) )