mirror of https://github.com/GNOME/gimp.git
Bug 728607 - Patch to make divide blend mode work at 32-bit floating point
Properly port divide mode to 32-bit float.
This commit is contained in:
parent
b196a42d8e
commit
3915ac01b4
|
@ -108,8 +108,8 @@ gimp_operation_divide_mode_process_pixels (gfloat *in,
|
|||
|
||||
for (b = RED; b < ALPHA; b++)
|
||||
{
|
||||
gfloat comp = (256.0 / 255.0 * in[b]) / (1.0 / 255.0 + layer[b]);
|
||||
comp = MIN (comp, 1.0);
|
||||
gfloat comp = (4294967296.0 / 4294967295.0 * in[b]) / (1.0 / 4294967295.0 + layer[b]);
|
||||
comp = CLAMP (comp, 0.0, 1.0);
|
||||
|
||||
out[b] = comp * ratio + in[b] * (1.0 - ratio);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue