// This macro demonstrates an overshooting bug in the spline fitter
// in ImageJ 1.48d and earlier that could cause incorrect perimeter
// and length measurements. It outputs length measurements of
// 200 and 265.174 on ImageJ 1.47 and 200 and 200 on ImageJ 1.48f.

  newImage("spline-test", "8-bit ramp", 500, 500, 1);
  x = newArray(100, 110, 290, 300);
  y = newArray(90, 90, 90, 90);
  makeSelection("polyline", x, y);
  run("Measure");
  run("Fit Spline");
  run("Measure");