app: eliminate unnecessary condition in GimpOperationReplaceMode

8-bit relic.
This commit is contained in:
Ell
2017-01-11 08:18:29 -05:00
parent ad134263d2
commit e17f640fba

View File

@ -106,20 +106,7 @@ gimp_operation_replace_process_pixels (gfloat *in,
gfloat ratio = opacity_value * layer[ALPHA] / new_alpha;
for (b = RED; b < ALPHA; b++)
{
gfloat t;
if (layer[b] > in[b])
{
t = (layer[b] - in[b]) * ratio;
out[b] = in[b] + t;
}
else
{
t = (in[b] - layer[b]) * ratio;
out[b] = in[b] - t;
}
}
out[b] = (layer[b] - in[b]) * ratio + in[b];
}
else
{