Warning: session_start(): open(/var/lib/php/sessions/sess_eq63q3nh3rfo28v8flhgo0js0c, 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
// result image is as large as the region's bounds
// with black pixels inside and white pixels outside the region
srecord noeq RegionToBWImage(IImageRegion region) {
settable Rect bounds;
BWImage image;
run {
bounds = region.bounds();
int x1 = bounds.x, y1 = bounds.y, w = bounds.w, h = bounds.h, i = 0;
byte[] pixels = new[w*h];
for y to h:
for x to w:
pixels[i++] = (byte) (region.contains(x1+x, y1+y) ? 0 : 0xFF);
image = new BWImage(w, h, pixels);
}
BWImage get() {
if (image == null) run();
ret image;
}
}