Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

August 16 2009

Auto white balance processing with Gimp

Googled and found nothing, except people asking for this. Place that script-fu chunk of code in your ~/.gimp*/scripts/batch-awb.scm and execude gimp -i -b '(batch-awb "*.JPG")' -b '(gimp-quit 0)'. 
(define (batch-awb 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))))
(plug-in-c-astretch RUN-NONINTERACTIVE image drawable)
;(set! drawable (car (gimp-image-get-active-layer image)))
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))
Based on http://www.gimp.org/tutorials/Basic_Batch/