2015-09-07 19:17:22 +00:00
|
|
|
; Based on script by Michiel Roos, found on:
|
|
|
|
; http://www.typofree.org/article/archive/2009/january/title/create-a-drop-shadow-folder-action/
|
|
|
|
;
|
|
|
|
; Place the script in your gimp scripts folder (eg. ~/.gimp-2.8/scripts) go to the
|
|
|
|
; folder with images you wish to add shadow to and execute like this:
|
2015-10-15 20:38:03 +00:00
|
|
|
; gimp --no-data -i -b '(batch-drop-shadow "*.png" 3 3 5)' -b '(gimp-quit 0)'
|
2015-09-07 19:17:22 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
(define (batch-drop-shadow pattern
|
|
|
|
offsetx
|
|
|
|
offsety
|
|
|
|
radius)
|
|
|
|
(let* ((filelist (cadr (file-glob pattern 1))))
|
|
|
|
(while (not (null? filelist))
|
|
|
|
(let* ((filename (car filelist))
|
|
|
|
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
|
|
|
|
(drawable (car (gimp-image-get-active-layer image))))
|
|
|
|
(script-fu-drop-shadow image drawable offsetx offsety radius '(0 0 0) 80.0 TRUE)
|
|
|
|
(set! drawable (car (gimp-image-merge-visible-layers image 0)))
|
|
|
|
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
|
|
|
|
(gimp-image-delete image)
|
|
|
|
)
|
|
|
|
(set! filelist (cdr filelist))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|