[gimp/gimp-2-10] Issue #1668 -- Smudge Tool - Wrong colors when painting on an image ...
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Issue #1668 -- Smudge Tool - Wrong colors when painting on an image ...
- Date: Sun, 17 Jun 2018 18:26:12 +0000 (UTC)
commit 226ea8863a70b9e6c5f9bd365c49c509b474186e
Author: Ell <ell_se yahoo com>
Date: Sun Jun 17 14:14:21 2018 -0400
Issue #1668 -- Smudge Tool - Wrong colors when painting on an image ...
... with a color profile other than the gimp built-in.
When initializing the smude tool's accum buffer, use
gimp_pickable_get_pixel_at(), instead of
gimp_pickable_get_color_at(), for picking the initial color to fill
the buffer with, so that we don't erroneously apply the image's
color tranform to it when the image has a profile. Previously,
this would result in wrong colors when painting from the drawable
edges inward, with flow < 100%.
(cherry picked from commit 5a07876c78eb46a22899ecab0eeff53ae4536acd)
app/paint/gimpsmudge.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/app/paint/gimpsmudge.c b/app/paint/gimpsmudge.c
index a6f939578e..b8e108e4b3 100644
--- a/app/paint/gimpsmudge.c
+++ b/app/paint/gimpsmudge.c
@@ -260,19 +260,21 @@ gimp_smudge_start (GimpPaintCore *paint_core,
accum_size != gegl_buffer_get_width (paint_buffer) ||
accum_size != gegl_buffer_get_height (paint_buffer))
{
- GimpRGB pixel;
+ gfloat pixel[4];
GeglColor *color;
- gimp_pickable_get_color_at (GIMP_PICKABLE (drawable),
+ gimp_pickable_get_pixel_at (GIMP_PICKABLE (drawable),
CLAMP ((gint) coords->x,
0,
gimp_item_get_width (GIMP_ITEM (drawable)) - 1),
CLAMP ((gint) coords->y,
0,
gimp_item_get_height (GIMP_ITEM (drawable)) - 1),
- &pixel);
+ babl_format ("RGBA float"),
+ pixel);
- color = gimp_gegl_color_new (&pixel);
+ color = gegl_color_new (NULL);
+ gegl_color_set_pixel (color, babl_format ("RGBA float"), pixel);
gegl_buffer_set_color (accum_buffer, NULL, color);
g_object_unref (color);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]