Commit 0799d78d authored by Sven Neumann's avatar Sven Neumann

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 f7ff0903)
parent 35873d22
......@@ -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++)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment