Warning: session_start(): open(/var/lib/php/sessions/sess_cfq76dkbuu12u8qckentjpeqe7, 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
// undefined color, seems to be all black in practice
static BufferedImage newBufferedImage(int w, int h) {
ret new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
}
ifclass RGB
static BufferedImage newBufferedImage(int w, int h, RGB rgb) {
ret newBufferedImage(w, h, rgb.getColor());
}
endif
static BufferedImage newBufferedImage(int w, int h, Color color) {
BufferedImage img = newBufferedImage(w, h);
Graphics2D g = img.createGraphics();
g.setColor(or(color, Color.white));
g.fillRect(0, 0, w, h);
ret img;
}
ifclass Pt
static BufferedImage newBufferedImage(Pt p, Color color) {
ret newBufferedImage(p.x, p.y, color);
}
endif
static BufferedImage newBufferedImage(int w, int h, int[] pixels) {
ret intArrayToBufferedImage(pixels, w, h);
}