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:
Elle Stone 2014-04-20 08:39:23 -04:00 committed by Michael Natterer
parent b196a42d8e
commit 3915ac01b4
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}