static BWImage bwWhiteBorder(double w, double h, BWImage img) { BWImage img2 = new(img.w()+iround(w*2), img.h()+iround(h*2), 1); bwCopy(img, img2, iroundHalfDown (w), iroundHalfDown(h)); ret img2; }