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
This commit is contained in:

committed by
Sven Neumann

parent
06f2e093bc
commit
85bf9a7b16
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_toggle_clicked):
|
||||
|
@ -817,7 +817,7 @@ find_gradients (GimpDrawable *drawable,
|
||||
GimpPixelRgn dest_rgn;
|
||||
gint bytes;
|
||||
gint i, j;
|
||||
guchar *gr, * dh, * dv;
|
||||
guchar *gr, *dh, *dv;
|
||||
gint hmax, vmax;
|
||||
gint row, rows;
|
||||
gint ith_row;
|
||||
@ -894,13 +894,15 @@ find_gradients (GimpDrawable *drawable,
|
||||
{
|
||||
/* Find the gradient */
|
||||
if (!j || !i || (j == width - 1) || (i == height - 1))
|
||||
*gr = MAG_THRESHOLD;
|
||||
{
|
||||
*gr = MAG_THRESHOLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
hmax = *dh - 128;
|
||||
vmax = *dv - 128;
|
||||
|
||||
*gr = (guchar)sqrt (SQR (hmax) + SQR (hmax));
|
||||
*gr = (guchar) sqrt (SQR (hmax) + SQR (vmax));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user