[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/graphics/darkroom/src
From:       Cyrille Berger <cyb () lepi ! org>
Date:       2008-07-31 21:26:18
Message-ID: 1217539578.631688.12447.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 840326 by berger:

make exposure == 0 no change to the image

 M  +5 -1      PostProcessor.cpp  


--- trunk/playground/graphics/darkroom/src/PostProcessor.cpp #840325:840326
@@ -19,6 +19,8 @@
 #include <cmath>
 #include <cstring>
 
+#include <KDebug>
+
 #include "ColorManager.h"
 #include "ProcessingOptions.h"
 
@@ -29,7 +31,8 @@
 
 PostProcessor::PostProcessor( const ProcessingOptions& processingOptions) : d(new Private)
 {
-  d->exposure = pow(2, processingOptions.asDouble("Exposure") + 2.47393) * 0.0883883;
+  d->exposure = pow(2, processingOptions.asDouble("Exposure") + 2.47393 + 1) * 0.0883883;
+  kDebug() << "Exposure: " << d->exposure;
   setConvertToSRGB( processingOptions.asBool("ConvertToSRGB") );
 }
 
@@ -66,6 +69,7 @@
   _rgb[0] = clamp( (int)(_rgb[0] * d->exposure), 0, 0xFFFF);
   _rgb[1] = clamp( (int)(_rgb[1] * d->exposure), 0, 0xFFFF);
   _rgb[2] = clamp( (int)(_rgb[2] * d->exposure), 0, 0xFFFF);
+
   if( d->convertToSRGB )
   {
     ColorManager::instance()->RGB16linearToSRGB16( _rgb, _rgb );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic