!7 module WebCamPixelated > DynImageSurface { int width = 16; transient BufferedImage lastImage; start { doEvery(1000, rstUpdate()); } visualize { JComponent c = super.visualize(); imageSurface.interpolationMode = 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)); } }