[Gimp-developer] ping?

2002-10-29 Thread Jim Meier
Is the list broken or just quiet?

-fatjim

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



[Gimp-developer] Blurs patch, smaller values possible

2002-10-29 Thread Guillermo S. Romero / Familia Romero
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 -   1.42
+++ plug-ins/common/gauss_iir.c 29 Oct 2002 17:29:17 -
@@ -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 = 0.0))
status = GIMP_PDB_CALLING_ERROR;
  INIT_I18N();
  break;
@@ -279,7 +277,7 @@ run (gchar  *name,
  b2vals.horizontal = param[3].data.d_float;
  b2vals.vertical   = param[4].data.d_float;
}
- if (status == GIMP_PDB_SUCCESS  (b2vals.horizontal  1.0  
b2vals.vertical  1.0))
+ if (status == GIMP_PDB_SUCCESS  (b2vals.horizontal = 0.0  
+b2vals.vertical = 0.0))
status = GIMP_PDB_CALLING_ERROR;
  break;
  
@@ -409,8 +407,8 @@ gauss_iir_dialog (void)
   gtk_widget_show (label);
 
   spinbutton = gimp_spin_button_new (adj,
-bvals.radius, 1.0, GIMP_MAX_IMAGE_SIZE,
-1.0, 5.0, 0, 1, 2);
+bvals.radius, 0.0, GIMP_MAX_IMAGE_SIZE,
+0.0, 5.0, 0, 1, 2);
   gtk_box_pack_start (GTK_BOX (hbox), spinbutton, TRUE, TRUE, 0);
   gtk_widget_show (spinbutton);
 
@@ -470,7 +468,7 @@ gauss_iir2_dialog (gint32image_I
   gimp_image_get_resolution (image_ID, xres, yres);
   unit = gimp_image_get_unit (image_ID);
 
-  size = gimp_coordinates_new (unit, %a, TRUE, FALSE, -1,
+  size = gimp_coordinates_new (unit, %a, TRUE, FALSE, 75, 
   GIMP_SIZE_ENTRY_UPDATE_SIZE,
 
   b2vals.horizontal == b2vals.vertical,
@@ -583,7 +581,7 @@ gauss_iir (GimpDrawable *drawable,
   gint *gi_tmp1, *gi_tmp2;
   gdouble std_dev;
 
-  if (horz  1.0  vert  1.0)
+  if (horz = 0.0  vert = 0.0)
 return;
 
   gimp_drawable_mask_bounds (drawable-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 = 0.0 ) ? 0 : width * height * horz;
+  max_progress += (vert = 0.0 ) ? 0 : width * height * vert;
 
   if (has_alpha)
 multiply_alpha (src, height, bytes);
   
   /*  First the vertical pass  */
-  if (vert = 1.0)
+  if (vert  0.0)
 {
   vert = fabs (vert) + 1.0;
   

[Gimp-developer] Defaults for sel2path

2002-10-29 Thread David Neary

Hi all,

Following a little discussion that myself and nomis were having
on irc, we got talking about the default option values for 
sel2path, which we agreed provided far too many control points.
I told him that I'd played around with it, and gotten values
which produced results I considered better. He suggested I put
them in a mail to the developers list, and suggest them as new
defaults. 

So here goes... could people comment on whether they think these
are pretty crap, or whether people reckon these might be better
as defaults? Cheers. By the way, for those that don't know, to
bring up the menu, Shift-Click on the selection-to-path button in
the paths dialog while there's a selection active.

I've attached a patch which changes the defaults. Are there any
objections to me committing this for 1.2 and 1.3?

Cheers,
Dave.

Propsed defaults are:

Align threshold: 1.0
Corner always threshold: 60.0
Corner surround: 4
Corner threshold: 100.0
Error threshold: 1.0
Filter alternative surround: 1
Filter epsilon: 10.0
Filter iteration count: 10
Filter percent: 0.33
Filter secondary surround: 5
Filter surround: 3
Unckeck Keep knees
Line reversion threshold: 0.10
Line threshold: 0.5
Reparametrize improvement: 0.02
Reparametrize threshold: 1.00
Subdivide search: 0.25
Subdivide surround: 6
Subdivide threshold: 0.5
Tangent surround: 4

-- 
   David Neary,
Marseille, France
  E-Mail: [EMAIL PROTECTED]

Index: plug-ins/sel2path/fit.c
===
RCS file: /cvs/gnome/gimp/plug-ins/sel2path/fit.c,v
retrieving revision 1.6
diff -u -r1.6 fit.c
--- plug-ins/sel2path/fit.c 22 May 2000 17:10:23 -  1.6
+++ plug-ins/sel2path/fit.c 22 Oct 2002 14:17:47 -
@@ -34,7 +34,7 @@
 
 /* If two endpoints are closer than this, they are made to be equal.
(-align-threshold)  */ 
-real align_threshold = 0.5;
+real align_threshold = 1.0;
 
 /* If the angle defined by a point and its predecessors and successors
is smaller than this, it's a corner, even if it's within
@@ -55,7 +55,7 @@
pixel is further away than this from the fitted curve, we try again.
(-error-threshold) */
 /* real error_threshold = .8; ALT */
-real error_threshold = .4;
+real error_threshold = 1.0;
 
 /* A second number of adjacent points to consider when filtering.
(-filter-alternative-surround)  */
@@ -71,7 +71,7 @@
results.  But if any points that ``should'' be corners aren't found,
the curve goes to hell around that point.  (-filter-iterations)  */
 /* unsigned filter_iteration_count = 4; ALT */
-unsigned filter_iteration_count = 4;
+unsigned filter_iteration_count = 10;
 
 /* To produce the new point, use the old point plus this times the
neighbors.  (-filter-percent)  */
@@ -79,11 +79,11 @@
 
 /* Number of adjacent points to consider if `filter_surround' points
defines a straight line.  (-filter-secondary-surround)  */
-unsigned filter_secondary_surround = 3;
+unsigned filter_secondary_surround = 5;
 
 /* Number of adjacent points to consider when filtering.
   (-filter-surround)  */
-unsigned filter_surround = 2;
+unsigned filter_surround = 3;
 
 /* Says whether or not to remove ``knee'' points after finding the outline. 
(See the comments at `remove_knee_points'.)  (-remove-knees).  */
@@ -93,7 +93,7 @@
straight line, even if it would otherwise be changed back to a curve.
This is weighted by the square of the curve length, to make shorter
curves more likely to be reverted.  (-line-reversion-threshold)  */
-real line_reversion_threshold = .01;
+real line_reversion_threshold = .1;
 
 /* How many pixels (on the average) a spline can diverge from the line
determined by its endpoints before it is changed to a straight line.
@@ -104,7 +104,7 @@
 /* If reparameterization doesn't improve the fit by this much percent,
stop doing it.  (-reparameterize-improve)  */
 /* real reparameterize_improvement = .10; ALT */
-real reparameterize_improvement = .01;
+real reparameterize_improvement = .10;
 
 /* Amount of error at which it is pointless to reparameterize.  This
happens, for example, when we are trying to fit the outline of the
@@ -117,19 +117,19 @@
 
 /* Percentage of the curve away from the worst point to look for a
better place to subdivide.  (-subdivide-search)  */
-real subdivide_search = .1;
+real subdivide_search = .25;
 
 /* Number of points to consider when deciding whether a given point is a
better place to subdivide.  (-subdivide-surround)  */
-unsigned subdivide_surround = 4;
+unsigned subdivide_surround = 6;
 
 /* How many pixels a point can diverge from a straight line and still be
considered a better place to subdivide.  (-subdivide-threshold) */
-real subdivide_threshold = .03;
+real subdivide_threshold = .5;
 
 /* Number of points to look at on either side of a point when computing
the approximation to the tangent at that point.  (-tangent-surround)  */
-unsigned tangent_surround = 3;
+unsigned