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