[gegl] Fix contrast boost in negative-darkroom
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Fix contrast boost in negative-darkroom
- Date: Sun, 25 Jul 2021 11:03:49 +0000 (UTC)
commit ed669b4cc835a4f575045a21c5426729df87a1c9
Author: JonnyRobbie <marcodv seznam cz>
Date: Sun Jul 18 00:05:07 2021 +0200
Fix contrast boost in negative-darkroom
operations/common/negative-darkroom.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/operations/common/negative-darkroom.c b/operations/common/negative-darkroom.c
index 0086c567e..63faede5c 100644
--- a/operations/common/negative-darkroom.c
+++ b/operations/common/negative-darkroom.c
@@ -315,6 +315,11 @@ process (GeglOperation *operation,
b = log10(b);
/*printf("Logarithmic RGB intensity %f %f %f\n", r, g, b);*/
+ // Adjust contrast
+ r = (r - rMid) * o->contrast + rMid;
+ g = (g - gMid) * o->contrast + gMid;
+ b = (b - bMid) * o->contrast + bMid;
+
// Apply the DH curve
r = curve_lerp(curves[o->curve].rx,
curves[o->curve].ry,
@@ -341,11 +346,6 @@ process (GeglOperation *operation,
b -= Dfogy;
/*printf("Adjusted RGB density %f %f %f\n", r, g, b);*/
- // Adjust contrast
- r = (r - rMid) * o->contrast + rMid;
- g = (g - gMid) * o->contrast + gMid;
- b = (b - bMid) * o->contrast + bMid;
-
// Simulate dye density with exponentiation to get
// the CIEXYZ transmittance back
out[0] = pow(10, -(r * curves[o->curve].cdens.X +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]