Warning: session_start(): open(/var/lib/php/sessions/sess_sg2aiqefpk1fo2rk4ipvsfjbvf, 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
!7
module WebCamPixelated > DynImageSurface {
int width = 16;
transient BufferedImage lastImage;
start { doEvery(1000, rstUpdate()); }
void enhanceFrame(Container f) {
super.enhanceFrame(f);
internalFramePopupMenuItem(f/JInternalFrame, "Width...", r {
final JTextField tf = jtextfield(str(width));
showFormTitled("Set Pixelated Image Width",
"Width:", tf,
r { setField(width := parseInt(gtt(tf)), lastImage := null) });
});
}
visualize {
JComponent c = super.visualize();
imageSurface.interpolationMode = RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
ret c;
}
void update {
if (imageSurface == null) ret;
final BufferedImage img = dm_webCamImage();
temp tempAfterwards(r { lastImage = img });
if (img == null || img == lastImage) ret;
setZoom(doubleRatio(img.getWidth(), width));
setImage(resizeImage(img, width));
}
}