[gimp] app: convert bg color to image color space when removing alpha



commit 3b15ff5d309514c0aa6b355fc006322a8f005fdb
Author: Ell <ell_se yahoo com>
Date:   Tue Oct 24 14:32:05 2017 -0400

    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.

 app/core/gimplayer.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index 31c0acc..8e36bf3 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]