Commit 85bf9a7b authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

fixed problem pointed out in bug #403580.

2007-02-02  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/mosaic.c (find_gradients): fixed problem pointed
	out in bug #403580.


svn path=/trunk/; revision=21837
parent 06f2e093
2007-02-02 Sven Neumann <sven@gimp.org>
* plug-ins/common/mosaic.c (find_gradients): fixed problem pointed
out in bug #403580.
2007-02-02 Sven Neumann <sven@gimp.org> 2007-02-02 Sven Neumann <sven@gimp.org>
   
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_toggle_clicked): * app/widgets/gimpitemtreeview.c (gimp_item_tree_view_toggle_clicked):
...@@ -817,7 +817,7 @@ find_gradients (GimpDrawable *drawable, ...@@ -817,7 +817,7 @@ find_gradients (GimpDrawable *drawable,
GimpPixelRgn dest_rgn; GimpPixelRgn dest_rgn;
gint bytes; gint bytes;
gint i, j; gint i, j;
guchar *gr, * dh, * dv; guchar *gr, *dh, *dv;
gint hmax, vmax; gint hmax, vmax;
gint row, rows; gint row, rows;
gint ith_row; gint ith_row;
...@@ -894,13 +894,15 @@ find_gradients (GimpDrawable *drawable, ...@@ -894,13 +894,15 @@ find_gradients (GimpDrawable *drawable,
{ {
/* Find the gradient */ /* Find the gradient */
if (!j || !i || (j == width - 1) || (i == height - 1)) if (!j || !i || (j == width - 1) || (i == height - 1))
{
*gr = MAG_THRESHOLD; *gr = MAG_THRESHOLD;
}
else else
{ {
hmax = *dh - 128; hmax = *dh - 128;
vmax = *dv - 128; vmax = *dv - 128;
*gr = (guchar)sqrt (SQR (hmax) + SQR (hmax)); *gr = (guchar) sqrt (SQR (hmax) + SQR (vmax));
} }
} }
} }
......
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