[gimp] Bug 791512 - make the selection boundary detection the same as 2.8
- From: Thomas Manni <tmanni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 791512 - make the selection boundary detection the same as 2.8
- Date: Mon, 18 Dec 2017 22:50:12 +0000 (UTC)
commit 27512d802b221df14b7c805e4ceccf710fcd0e4e
Author: Thomas Manni <thomas manni free fr>
Date: Mon Dec 18 21:01:30 2017 +0100
Bug 791512 - make the selection boundary detection the same as 2.8
Replace the GIMP_BOUNDARY_HALF_WAY macro by two others : one for perceptual and
one for linear gamma.
Use the GIMP_BOUNDARY_HALF_WAY_LINEAR to compute channels and floating selection
boundaries.
app/core/gimpboundary.h | 3 ++-
app/core/gimpchannel.c | 4 ++--
app/core/gimplayer-floating-selection.c | 2 +-
app/tools/gimpregionselecttool.c | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/app/core/gimpboundary.h b/app/core/gimpboundary.h
index 29049ad..c2adc0a 100644
--- a/app/core/gimpboundary.h
+++ b/app/core/gimpboundary.h
@@ -20,7 +20,8 @@
/* half intensity for mask */
-#define GIMP_BOUNDARY_HALF_WAY 0.5
+#define GIMP_BOUNDARY_HALF_WAY_PERCEPTUAL 0.5
+#define GIMP_BOUNDARY_HALF_WAY_LINEAR 0.214041
typedef enum
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index 964a393..b6947b3 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -1169,7 +1169,7 @@ gimp_channel_real_boundary (GimpChannel *channel,
babl_format ("Y float"),
GIMP_BOUNDARY_IGNORE_BOUNDS,
x1, y1, x2, y2,
- GIMP_BOUNDARY_HALF_WAY,
+ GIMP_BOUNDARY_HALF_WAY_LINEAR,
&channel->num_segs_out);
x1 = MAX (x1, x3);
y1 = MAX (y1, y3);
@@ -1182,7 +1182,7 @@ gimp_channel_real_boundary (GimpChannel *channel,
babl_format ("Y float"),
GIMP_BOUNDARY_WITHIN_BOUNDS,
x1, y1, x2, y2,
- GIMP_BOUNDARY_HALF_WAY,
+ GIMP_BOUNDARY_HALF_WAY_LINEAR,
&channel->num_segs_in);
}
else
diff --git a/app/core/gimplayer-floating-selection.c b/app/core/gimplayer-floating-selection.c
index b1bac93..236356a 100644
--- a/app/core/gimplayer-floating-selection.c
+++ b/app/core/gimplayer-floating-selection.c
@@ -267,7 +267,7 @@ floating_sel_boundary (GimpLayer *layer,
babl_format ("A float"),
GIMP_BOUNDARY_WITHIN_BOUNDS,
0, 0, width, height,
- GIMP_BOUNDARY_HALF_WAY,
+ GIMP_BOUNDARY_HALF_WAY_LINEAR,
&layer->fs.num_segs);
/* offset the segments */
diff --git a/app/tools/gimpregionselecttool.c b/app/tools/gimpregionselecttool.c
index f1604a8..c1674b4 100644
--- a/app/tools/gimpregionselecttool.c
+++ b/app/tools/gimpregionselecttool.c
@@ -310,7 +310,7 @@ gimp_region_select_tool_draw (GimpDrawTool *draw_tool)
0, 0,
gegl_buffer_get_width (region_sel->region_mask),
gegl_buffer_get_height (region_sel->region_mask),
- GIMP_BOUNDARY_HALF_WAY,
+ GIMP_BOUNDARY_HALF_WAY_LINEAR,
®ion_sel->n_segs);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]