RSS/Atom feed Twitter
Site is read-only, email is disabled

Blurs patch, smaller values possible

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

Blurs patch, smaller values possible Guillermo S. Romero / Familia Romero 29 Oct 18:45
Guillermo S. Romero / Familia Romero
2002-10-29 18:45:16 UTC (over 21 years ago)

Blurs patch, smaller values possible

Hi:

Lowering the level of blurs, so any positive value is valid.

Index: plug-ins/common/gauss_iir.c =================================================================== RCS file: /cvs/gnome/gimp/plug-ins/common/gauss_iir.c,v retrieving revision 1.42
diff -u -p -r1.42 gauss_iir.c
--- plug-ins/common/gauss_iir.c 6 Sep 2002 20:44:36 -0000 1.42 +++ plug-ins/common/gauss_iir.c 29 Oct 2002 17:29:17 -0000 @@ -126,7 +126,7 @@ query (void)
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, { GIMP_PDB_IMAGE, "image", "Input image (unused)" }, { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }, - { GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels > 1.0)" }, + { GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels > 0.0)" }, { GIMP_PDB_INT32, "horizontal", "Blur in horizontal direction" }, { GIMP_PDB_INT32, "vertical", "Blur in vertical direction" } };
@@ -150,9 +150,8 @@ query (void)
"independently invoked by specifying only one to " "run. The IIR gaussian blurring works best for " "large radius values and for images which are not " - "computer-generated. Values for radius less than " - "1.0 are invalid as they will generate spurious " - "results.",
+ "computer-generated. Values for radius 0.0 are" + "invalid as they will generate spurious results.", "Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis", "1995-1996",
@@ -172,9 +171,8 @@ query (void)
"horizontal and the vertical direction. The IIR " "gaussian blurring works best for large radius " "values and for images which are not " - "computer-generated. Values for radii less than " - "1.0 would generate spurious results. Therefore " - "they are interpreted as 0.0, which means that the " + "computer-generated. Values for radii 0.0 " + "would generate spurious results. Therefore " "computation for this orientation is skipped.", "Spencer Kimball, Peter Mattis & Sven Neumann", "Spencer Kimball, Peter Mattis & Sven Neumann", @@ -235,7 +233,7 @@ run (gchar *name, bvals.horizontal = (param[4].data.d_int32) ? TRUE : FALSE; bvals.vertical = (param[5].data.d_int32) ? TRUE : FALSE; }
- if (status == GIMP_PDB_SUCCESS && (bvals.radius < 1.0)) + if (status == GIMP_PDB_SUCCESS && (bvals.radius < 1.0 && b2vals.vertical < 1.0)) + if (status == GIMP_PDB_SUCCESS && (b2vals.horizontal < 1.0 && vert < 1.0) + if (horz drawable_id, &x1, &y1, &x2, &y2); @@ -611,14 +609,14 @@ gauss_iir (GimpDrawable *drawable, TRUE, TRUE);
progress = 0.0;
- max_progress = (horz < 1.0 ) ? 0 : width * height * horz; - max_progress += (vert < 1.0 ) ? 0 : width * height * vert; + max_progress = (horz = 1.0)
+ if (vert > 0.0)
{
vert = fabs (vert) + 1.0;
std_dev = sqrt (-(vert * vert) / (2 * log (1.0 / 255.0))); @@ -699,7 +697,7 @@ gauss_iir (GimpDrawable *drawable, }

/* Now the horizontal pass */
-if (horz >= 1.0)
+if (horz > 0.0)
{
horz = fabs (horz) + 1.0;

Index: plug-ins/common/gauss_rle.c
=================================================================== RCS file: /cvs/gnome/gimp/plug-ins/common/gauss_rle.c,v retrieving revision 1.37
diff -u -p -r1.37 gauss_rle.c
--- plug-ins/common/gauss_rle.c 6 Sep 2002 20:44:36 -0000 1.37 +++ plug-ins/common/gauss_rle.c 29 Oct 2002 17:29:17 -0000 @@ -120,7 +120,7 @@ query (void)
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, { GIMP_PDB_IMAGE, "image", "Input image (unused)" }, { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }, - { GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels > 1.0)" }, + { GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels > 0.0)" }, { GIMP_PDB_INT32, "horizontal", "Blur in horizontal direction" }, { GIMP_PDB_INT32, "vertical", "Blur in vertical direction" } };
@@ -145,7 +145,7 @@ query (void)
"run. The RLE gaussian blurring performs most " "efficiently on computer-generated images or images " "with large areas of constant intensity. Values for " - "radii less than 1.0 are invalid as they would " + "radii 0.0 are invalid as they would " "generate spurious results.",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis", @@ -167,9 +167,8 @@ query (void)
"gaussian blurring performs most efficiently on " "computer-generated images or images with large " "areas of constant intensity. Values for radii " - "less than 1.0 would generate spurious results. " - "Therefore they are interpreted as 0.0, which means " - "that the computation for this orientation is " + "0.0 would generate spurious results. " + "Therefore the computation for this orientation is " "skipped.",
"Spencer Kimball, Peter Mattis & Sven Neumann", "Spencer Kimball, Peter Mattis & Sven Neumann", @@ -230,7 +229,7 @@ run (gchar *name, bvals.horizontal = (param[4].data.d_int32) ? TRUE : FALSE; bvals.vertical = (param[5].data.d_int32) ? TRUE : FALSE; }
- if (status == GIMP_PDB_SUCCESS && (bvals.radius < 1.0)) + if (status == GIMP_PDB_SUCCESS && (bvals.radius < 1.0 && b2vals.vertical < 1.0)) + if (status == GIMP_PDB_SUCCESS && (b2vals.horizontal < 1.0 && vert < 1.0) + if (horz drawable_id, &x1, &y1, &x2, &y2); @@ -604,14 +603,14 @@ gauss_rle (GimpDrawable *drawable, TRUE, TRUE);
progress = 0.0;
- max_progress = (horz < 1.0 ) ? 0 : width * height * horz; - max_progress += (vert < 1.0 ) ? 0 : width * height * vert; + max_progress = (horz = 1.0)
+ if (vert > 0.0)
{
vert = fabs (vert) + 1.0;
std_dev = sqrt (-(vert * vert) / (2 * log (1.0 / 255.0))); @@ -685,7 +684,7 @@ gauss_rle (GimpDrawable *drawable, }

/* Now the horizontal pass */
- if (horz >= 1.0)
+ if (horz > 0.0)
{
horz = fabs (horz) + 1.0;

Index: plug-ins/common/sel_gauss.c
=================================================================== RCS file: /cvs/gnome/gimp/plug-ins/common/sel_gauss.c,v retrieving revision 1.24
diff -u -p -r1.24 sel_gauss.c
--- plug-ins/common/sel_gauss.c 24 Aug 2002 23:52:14 -0000 1.24 +++ plug-ins/common/sel_gauss.c 29 Oct 2002 17:29:17 -0000 @@ -105,7 +105,7 @@ query (void)
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, { GIMP_PDB_IMAGE, "image", "Input image (unused)" }, { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }, - { GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels >= 0.1)" }, + { GIMP_PDB_FLOAT, "radius", "Radius of gaussian blur (in pixels > 0.0)" }, { GIMP_PDB_INT32, "maxdelta", "Maximum delta" } };

@@ -171,7 +171,7 @@ run (gchar *name, bvals.radius = param[3].data.d_float; bvals.maxdelta = CLAMP (param[4].data.d_int32, 0, 255);
- if (bvals.radius < 0.1)
+ if (bvals.radius ), 1.0, 0.5,

GSR