[gimp] Bug 595170 - brush - color from gradient works wrong in greyscale
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 595170 - brush - color from gradient works wrong in greyscale
- Date: Sat, 26 Jun 2010 23:56:55 +0000 (UTC)
commit 15fd08747de7bfac29dd13550109c58f484bdb7a
Author: Michael Natterer <mitch gimp org>
Date: Sun Jun 27 01:55:21 2010 +0200
Bug 595170 - brush - color from gradient works wrong in greyscale
Convert the gradient color to the drawable's type before using it.
app/paint/gimppaintbrush.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/app/paint/gimppaintbrush.c b/app/paint/gimppaintbrush.c
index 0bfcecc..28bd385 100644
--- a/app/paint/gimppaintbrush.c
+++ b/app/paint/gimppaintbrush.c
@@ -151,15 +151,22 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
paint_core->pixel_dist,
&gradient_color))
{
+ guchar pixel[MAX_CHANNELS] = { OPAQUE_OPACITY,
+ OPAQUE_OPACITY,
+ OPAQUE_OPACITY,
+ OPAQUE_OPACITY };
+
opacity *= gradient_color.a;
gimp_rgb_get_uchar (&gradient_color,
&col[RED],
&col[GREEN],
&col[BLUE]);
- col[ALPHA] = OPAQUE_OPACITY;
- color_pixels (temp_buf_get_data (area), col,
+ gimp_image_transform_color (image, gimp_drawable_type (drawable), pixel,
+ GIMP_RGB, col);
+
+ color_pixels (temp_buf_get_data (area), pixel,
area->width * area->height,
area->bytes);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]