Commit 5730278e authored by Michael Natterer's avatar Michael Natterer 😴

Bug 759796 - Blend tool regression

We must not dither the alpha channel if it is fully opaque or fully
transparent. 2.8 did the same but the dithering of these values was
apparently consumed be putting the result into 8 bit values.
parent d9e608f7
......@@ -944,7 +944,11 @@ gradient_put_pixel (gint x,
r = color->r + (gdouble) (i & 0xff) / 256.0 / 256.0; i >>= 8;
g = color->g + (gdouble) (i & 0xff) / 256.0 / 256.0; i >>= 8;
b = color->b + (gdouble) (i & 0xff) / 256.0 / 256.0; i >>= 8;
a = color->a + (gdouble) (i & 0xff) / 256.0 / 256.0;
if (color->a > 0.0 && color->a < 1.0)
a = color->a + (gdouble) (i & 0xff) / 256.0 / 256.0;
else
a = color->a;
*dest++ = MAX (r, 0.0);
*dest++ = MAX (g, 0.0);
......@@ -1119,7 +1123,11 @@ gimp_operation_blend_process (GeglOperation *operation,
r = color.r + (gdouble) (i & 0xff) / 256.0 / 256.0; i >>= 8;
g = color.g + (gdouble) (i & 0xff) / 256.0 / 256.0; i >>= 8;
b = color.b + (gdouble) (i & 0xff) / 256.0 / 256.0; i >>= 8;
a = color.a + (gdouble) (i & 0xff) / 256.0 / 256.0;
if (color.a > 0.0 && color.a < 1.0)
a = color.a + (gdouble) (i & 0xff) / 256.0 / 256.0;
else
a = color.a;
*dest++ = MAX (r, 0.0);
*dest++ = MAX (g, 0.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment