0> In article <1196237626l.19295l.0l@tangerine>, 0> Jean-Luc Coulon <URL:mailto:jean.luc.coulon@xxxxxxxxx> ("Jean-Luc") wrote: Jean-Luc> A nice feature in this case would be to be able to get the Jean-Luc> white point in an OTHER picture. Jean-Luc> Jean-Luc> With digital photography, I use often raw pictures. At the Jean-Luc> beginning of the shot, I get a picture of a grey/white card Jean-Luc> which will be the white reference for all the following Jean-Luc> pictures. If the light conditions change, I get an other Jean-Luc> picture of the grey chart and so I never mind of the camara Jean-Luc> white balance, all the wotk is done in post-processing. Jean-Luc> Jean-Luc> So it would be nice to be able to open a white reference Jean-Luc> picture and pick reference from this picture an apply it to Jean-Luc> the other shots. I use a script that does this. It's very simple and doesn't deal with colour management, or extreme colours. It is, however, simple to use - just select the colour that should be white (e.g. with the picker), and then run the plug-in. It's particularly handy for your case, because as long as you have the same selected foreground colour, you can run the script on many images. Here's the script-fu: ---- cut here --- ; whitebalance.scm ; adjust image white balance based on current foreground color. ; Author: Toby Speight <streapadair@xxxxxxx> ; Licence terms: GNU GPL v2 or later (script-fu-register "script-fu-whitebalance" "<Image>/Colors/_White Balance" "Adjust the image colors so that the current foreground color becomes completely desaturated. In other words, if you have selected a color from the image that should be white, then this will correct any color cast." "Toby Speight <streapadair@xxxxxxx>" "Toby Speight" "2005-10-20" "RGB*" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0) (define (script-fu-whitebalance img drawable) (let* ((color (car (gimp-context-get-foreground))) (red (car color)) (blue (cadr color)) (green (caddr color)) (mean (/ (+ red blue green) 3.0))) ;; TODO: check for divide-by-zero (plug-in-colors-channel-mixer 1 img drawable 0 (/ mean red) 0.0 0.0 0.0 (/ mean blue) 0.0 0.0 0.0 (/ mean green)) (gimp-displays-flush))) _______________________________________________ Gimp-developer mailing list Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer