app: convert bg color to image color space when removing alpha

When removing a layer's alpha channel, convert the background color
from sRGB to the image color space before compositing the layer on
top of it.
This commit is contained in:
Ell 2017-10-24 14:32:05 -04:00
parent 7c32451dfb
commit 3b15ff5d30
1 changed files with 2 additions and 0 deletions

View File

@ -2189,6 +2189,8 @@ gimp_layer_remove_alpha (GimpLayer *layer,
gimp_drawable_get_format_without_alpha (GIMP_DRAWABLE (layer)));
gimp_context_get_background (context, &background);
gimp_pickable_srgb_to_image_color (GIMP_PICKABLE (layer),
&background, &background);
gimp_gegl_apply_flatten (gimp_drawable_get_buffer (GIMP_DRAWABLE (layer)),
NULL, NULL,