static BWImage bwFoldImage_extendToSize_autoContrast(BWImage big, BWImage pat) { ret bwBlackBorder(pat.getWidth()/2.0, pat.getHeight()/2.0, bwAutoContrast(bwFoldImage(big, pat))); }