[gimp] Bug 744265 - layer mode 'addition' makes wrong gray values
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 744265 - layer mode 'addition' makes wrong gray values
- Date: Tue, 13 Oct 2015 20:48:39 +0000 (UTC)
commit e089095631696eab5a329fc5e2a7a68f56f910e3
Author: Elle Stone <ellestone ninedegreesbelow com>
Date: Tue Oct 13 12:18:14 2015 -0400
Bug 744265 - layer mode 'addition' makes wrong gray values
Move CLAMP code in addition blend mode (CLAMP the result, not an
intermediate value).
app/operations/gimpoperationadditionmode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/operations/gimpoperationadditionmode.c b/app/operations/gimpoperationadditionmode.c
index fa02810..e2eda57 100644
--- a/app/operations/gimpoperationadditionmode.c
+++ b/app/operations/gimpoperationadditionmode.c
@@ -109,9 +109,9 @@ gimp_operation_addition_mode_process_pixels (gfloat *in,
for (b = RED; b < ALPHA; b++)
{
gfloat comp = in[b] + layer[b];
- comp = CLAMP (comp, 0.0, 1.0);
out[b] = comp * ratio + in[b] * (1.0 - ratio);
+ out[b] = CLAMP (out[b], 0.0, 1.0);
}
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]