[gimp] app: fix total weight calc. of hardness convolution kernel
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix total weight calc. of hardness convolution kernel
- Date: Sat, 8 Apr 2017 11:38:12 +0000 (UTC)
commit 5255d91032b28cc0c48c49b42091a6de11d48f4f
Author: Ell <ell_se yahoo com>
Date: Sat Apr 8 07:37:28 2017 -0400
app: fix total weight calc. of hardness convolution kernel
app/core/gimpbrush-transform.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpbrush-transform.c b/app/core/gimpbrush-transform.c
index cdfc0a1..f8af255 100644
--- a/app/core/gimpbrush-transform.c
+++ b/app/core/gimpbrush-transform.c
@@ -761,7 +761,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
gint rh = MIN (r, height - 1);
gfloat n = 2 * r + 1;
gfloat n_r = n * r;
- gfloat weight = (n * n / 2) * (n * n / 2 + 1);
+ gfloat weight = floor (n * n / 2) * (floor (n * n / 2) + 1);
gfloat weight_inv = 1 / weight;
gint x;
gint y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]