(define (tone-change-batch pattern tonefile) (let* ((filelist (cadr (file-glob pattern 1))) (dst_drawable (car (gimp-file-load RUN-NONINTERACTIVE tonefile tonefile)))) (while filelist (let* ((filename (car filelist)) (image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (dst_drawable (car (gimp-image-get-active-layer image)))) (plug-in-sample-colorize RUN-NONINTERACTIVE image dst_drawable sample_drawable TRUE TRUE TRUE TRUE 0 255 1.0 0 255) (gimp-file-save RUN-NONINTERACTIVE image dst_drawable filename filename) (gimp-image-delete image) ) (set! filelist (cdr filelist)) ) ) )