Created attachment 54305 [details]
avoid overesposure in white balance
Version: 1.6.0 (using KDE 4.4.3)
The white balance tool has a big problem in its current form: almost always it overexposes and clips at least one of the rgb components. The exposure compensation thing does not help here because it is applied on the already clipped image.
I wrote a simple proof-of-concept patch (attached) that makes the wb tool useable by scaling down the rgb multipiers just enough to prevent clipping.
The biggest problem with my patch is that the final image can be quite a lot dimmer than the preview image because the scaler smooths the (usually tiny) brightest spots of the photo.
Created attachment 54459 [details]
Prevent overexposure in WB tool
I prepared a better patch. This one is against the latest svn version, works in both 8 and 16 bits mode and it follows the coding style.
Thanks Pochini. I will review your patch soon...
Do you have an updated version of your patch working with 2.x code from git/master repository ?
Created attachment 65631 [details]
Prevent overexposure in the white balance tool
Yes, the patch is attached. It applies cleanly to any v2.x .
Git commit 86f103b771a9bdcc1a80f16e6f2a57c648ed5bc1 by Gilles Caulier.
Committed on 14/11/2011 at 14:47.
Pushed by cgilles into branch 'master'.
Apply patch #65631 to prevent Overexposure with Withe Balance adjustement.
Modify patch to always compute RGB multipliers over original image in case of preview rendering in image editor.
Use more private internal container plus code polish
M +3 -0 imageplugins/color/whitebalancetool.cpp
M +13 -4 libs/dimg/filters/wb/wbcontainer.h
M +103 -25 libs/dimg/filters/wb/wbfilter.cpp
M +17 -5 libs/dimg/filters/wb/wbfilter.h
M +12 -13 libs/dimg/filters/wb/wbsettings.cpp
M +2 -3 libs/dimg/filters/wb/wbsettings.h