Bug 259223 - Overexposure prevention in white balance tool [patch]
Summary: Overexposure prevention in white balance tool [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Plugin-Editor-WhiteBalance (show other bugs)
Version: 1.6.0
Platform: Compiled Sources Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-08 17:02 UTC by pochini
Modified: 2016-06-30 11:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.0


Attachments
avoid overesposure in white balance (1.45 KB, patch)
2010-12-08 17:02 UTC, pochini
Details
Prevent overexposure in WB tool (2.53 KB, patch)
2010-12-12 15:13 UTC, pochini
Details
Prevent overexposure in the white balance tool (2.54 KB, patch)
2011-11-13 23:04 UTC, pochini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pochini 2010-12-08 17:02:58 UTC
Created attachment 54305 [details]
avoid overesposure in white balance

Version:           1.6.0 (using KDE 4.4.3) 
OS:                Linux

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.


Reproducible: Sometimes
Comment 1 pochini 2010-12-12 15:13:05 UTC
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.
Comment 2 caulier.gilles 2010-12-13 08:50:44 UTC
Thanks Pochini. I will review your patch soon...

Gilles Caulier
Comment 3 caulier.gilles 2011-11-10 10:30:33 UTC
Pochini, 

Do you have an updated version of your patch working with 2.x code from git/master repository ?

Gilles Caulier
Comment 4 pochini 2011-11-13 23:04:59 UTC
Created attachment 65631 [details]
Prevent overexposure in the white balance tool

Yes, the patch is attached. It applies cleanly to any v2.x .
Comment 5 caulier.gilles 2011-11-14 13:50:24 UTC
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
BUGS: 259223

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

http://commits.kde.org/digikam/86f103b771a9bdcc1a80f16e6f2a57c648ed5bc1