Warning: session_start(): open(/var/lib/php/sessions/sess_qatdc0vra6jh476etlktn0fljn, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// minW/minH = how much of pattern has to be inside image
static BWImage bwFoldImage_withCorners2(BWImage big, BWImage pat, int minW, int minH) {
int wp = pat.getWidth(), hp = pat.getHeight();
int cutX = wp-minW, cutY = hp-minH;
int w = big.getWidth(), h = big.getHeight();
BWImage out = new(w-wp+minX*2, h-hp+minY*2);
for (int y = cutX; y < h+min; y++)
for (int x = cutY; x < w+wp; x++)
out.setPixel(x, y, bwImageSectionsSimilarity2_partial(big, pat,
x, y,
max(0, wp-x), max(0, hp-y),
min(wp, w+wp-x), min(hp, h+hp-y),
0));
ret out;
}