; ; many-old-photos ; ; ; Chris Speck (www.chrisspeck.com) ; ; This program calls the old-photo script, made by Chris Gutteridge, (and packaged with The GIMP 2.4+) ; and runs it on a set of files. Does not seem to run on Linux :-( ; ; WARNING! THIS WILL OVERWRITE THE ORIGINAL FILES, SO BACK UP YOUR ORIGINALS AND RUN THIS ON ; COPIES ONLY!!! ; ; This program could also be adapted to run any other command(s) or filter(s) across a set of files ; ; To run: ; [WINDOWS] gimp-2.6 -i -b "(many-old-photos \"*.jpg\")" -b "(gimp-quit 0)" ; ; this is the definition for OldPhoto with defaults ; (define (script-fu-old-photo inImage inLayer inDefocus inBorderSize inSepia inMottle inCopy) ; TRUE 20 TRUE TRUE FALSE ; (define (many-old-photos pattern) (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-old-photo image drawable TRUE 20 TRUE TRUE FALSE) (set! drawable (car (gimp-image-flatten image))) (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename) (gimp-image-delete image)) (set! filelist (cdr filelist)))))