Posted By

aprado on 11/03/09


Tagged

gimp script-fu


Versions (?)

Batch cinematic effect (batch-cine-photo.scm)


 / Published in: Lisp
 

How to use: gimp -i -b "(batch-cine-photo \"Z:\\My\ Photos\\*.jpg\")" -b '(gimp-quit 0)'

  1. (define (batch-cine-photo pattern)
  2. (let* (
  3. (filelist (cadr (file-glob pattern 1)))
  4. (jpgname)
  5. (filename)
  6. (image)
  7. (drawable)
  8. )
  9. (while (not (null? filelist))
  10. (set! filename (car filelist))
  11. (gimp-message filename)
  12. (set! image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
  13. (set! jpgname (car (strbreakup filename ".")))
  14. (set! jpgname (string-append jpgname "-mod.jpg"))
  15. (set! drawable (car (gimp-image-get-active-layer image)))
  16. ;(script-fu-cinema RUN-NONINTERACTIVE image drawable 0 0 0 0)
  17. ;(plug-in-unsharp-mask RUN-NONINTERACTIVE image drawable 5.0 0.5 0)
  18. (script-fu-cine-photo image 0 0 0 0 0 0)
  19. (set! drawable (car (gimp-image-get-active-layer image)))
  20. (gimp-file-save RUN-NONINTERACTIVE image drawable jpgname jpgname)
  21. (gimp-image-delete image)
  22.  
  23. (set! filelist (cdr filelist))
  24. )
  25. )
  26. )

Report this snippet  

You need to login to post a comment.