[gimp/gimp-2-6] Fix a width/height confusion in the healing tool algorithm
- From: Sven Neumann <neo src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-6] Fix a width/height confusion in the healing tool algorithm
- Date: Fri, 16 Oct 2009 20:11:07 +0000 (UTC)
commit 0799d78db2d13ca9d22152e37bd972d9c9a8653e
Author: Sven Neumann <sven gimp org>
Date: Fri Oct 16 22:06:34 2009 +0200
Fix a width/height confusion in the healing tool algorithm
As pointed out by Massimo Valentini in bug #519503, the code used
height where width should have been used. Correct.
(cherry picked from commit f7ff0903ff9e87caadd70df6dece0bf2b9d88fdb)
app/paint/gimpheal.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/app/paint/gimpheal.c b/app/paint/gimpheal.c
index a8635e0..4224f3f 100644
--- a/app/paint/gimpheal.c
+++ b/app/paint/gimpheal.c
@@ -299,17 +299,18 @@ gimp_heal_laplace_iteration (gdouble *matrix,
gdouble *solution,
guchar *mask)
{
- gint rowstride = width * depth;
- gint i, j, k;
- gdouble tmp, diff;
- gdouble err = 0.0;
+ const gint rowstride = width * depth;
+ gint i, j, k;
+ gdouble tmp, diff;
+ gdouble err = 0.0;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
- if ((0 == *mask) || (i == 0) || (i == (height - 1)) ||
- (j == 0) || (j == (height - 1)))
+ if ((0 == *mask) ||
+ (i == 0) || (i == (height - 1)) ||
+ (j == 0) || (j == (width - 1)))
{
/* do nothing at the boundary or outside mask */
for (k = 0; k < depth; k++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]