mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
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.
This commit is contained in:
parent
d9e608f722
commit
5730278eeb
1 changed files with 10 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue