Code

since all values are 0..1, shifting gamma up must use power<1 so that the values...
authorbuliabyak <buliabyak@users.sourceforge.net>
Mon, 18 Aug 2008 14:21:27 +0000 (14:21 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Mon, 18 Aug 2008 14:21:27 +0000 (14:21 +0000)
src/dialogs/clonetiler.cpp

index 048635bb97cca014489778b7cc5aa2e08f3ebacc..f3524d65edc1e724f22f13540573430646bd6525 100644 (file)
@@ -1405,10 +1405,10 @@ clonetiler_apply( GtkWidget */*widget*/, void * )
 
                 if (gamma_picked != 0) {
                     double power;
-                    if (gamma_picked < 0)
+                    if (gamma_picked > 0)
                         power = 1/(1 + fabs(gamma_picked));
                     else
-                        power = 1 + gamma_picked;
+                        power = 1 + fabs(gamma_picked);
 
                     val = pow (val, power);
                     r = pow (r, power);