mirror of https://github.com/GNOME/gimp.git
Bug 744265 - layer mode 'addition' makes wrong gray values
Move CLAMP code in addition blend mode (CLAMP the result, not an intermediate value).
This commit is contained in:
parent
8a7665d4b7
commit
e089095631
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue