[gimp] Issue #1980 - Color picker wrong results when picking from non-sRGB...
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Issue #1980 - Color picker wrong results when picking from non-sRGB...
- Date: Mon, 6 Aug 2018 13:08:24 +0000 (UTC)
commit 9530b5cea3e4ec3c2c1e230e99273af2231c1a1c
Author: Ell <ell_se yahoo com>
Date: Mon Aug 6 09:02:42 2018 -0400
Issue #1980 - Color picker wrong results when picking from non-sRGB...
...image using "Sample Average"
Also fix gimp_gegl_average_color(), which is where all current
implementers of GimpPickable actually calculate the average.
app/gegl/gimp-gegl-loops.cc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/gegl/gimp-gegl-loops.cc b/app/gegl/gimp-gegl-loops.cc
index 1c5febf6f9..6e7929c9d2 100644
--- a/app/gegl/gimp-gegl-loops.cc
+++ b/app/gegl/gimp-gegl-loops.cc
@@ -1024,16 +1024,19 @@ gimp_gegl_average_color (GeglBuffer *buffer,
gint n;
} Sum;
- const Babl *average_format = babl_format ("RaGaBaA float");
+ const Babl *average_format;
GeglRectangle roi;
- GSList * volatile sums = NULL;
+ GSList * volatile sums = NULL;
GSList *list;
- Sum average = {};
+ Sum average = {};
gint c;
g_return_if_fail (GEGL_IS_BUFFER (buffer));
g_return_if_fail (color != NULL);
+ average_format = babl_format_with_space ("RaGaBaA float",
+ babl_format_get_space (format));
+
if (! rect)
rect = gegl_buffer_get_extent (buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]