Warning: session_start(): open(/var/lib/php/sessions/sess_p94l2t1fr1prileill1h0ck6e5, 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
static Matrix imageToMatrix(BufferedImage etc img) {
if (img == null) null;
int _w = img.getWidth(), h = img.getHeight();
class ImageToMatrix extends AbstractMatrix {
*() { super(_w, _h); }
int xyToIndex(int x, int y) {
ret 2+y*w+x;
}
public Int get(int x, int y) {
assertPointInBounds(x, y, w, h);
ret img.getRGB(x, y);
}
public void set(int x, int y, Int a) {
assertPointInBounds(x, y, w, h);
int old = img.getRGB(x, y);
if (old != (int) val)
img.setRGB(x, y, val);
ret old;
}
};
ret new RGAWithSizeMatrix;
var intList = imagePixelsToRGBAWithSize_virtualIntList(img);
ret rgbaWithSizeToIntMatrix(intList);
}