Libraryless. Click here for Pure Java version (9983L/69K/229K).
!759 static int maxPixels = 6*1000*1000; static long pixels; p { conceptsAndBot(60*1000); // auto-save every minute awt { showControls(jcenteredLine(jbutton("Show grabbed images", r { nohupJavax("#1005971") }))); } while licensed { printFullHeapSizeWithGC(); long time = now(); AutoShootInfo info = autoShoot(); pixels = totalPixelCount(collect(list(GrabbedImage), "image")); long singlePixels = totalPixelCount(collect(conceptsWhere(GrabbedImage, count := 1), "image")); done_always(time, "Seeing " + n(l(info.segments), "things") + ", " + info.considered + " in right size, now " + n(countConcepts(GrabbedImage), "image") + " in store, " + toM(pixels) + "M pixels (" + toM(singlePixels) + "M seen only once)"); slimDB(); sleepSeconds(10); } } svoid slimDB { if (pixels > maxPixels) { int n = 0; for (GrabbedImage gi : sortByField(list(GrabbedImage), "count")) { pixels -= totalPixelCount(gi.image); gi.delete(); ++n; if (pixels <= maxPixels) break; } print(" Deleted " + n(n, "images") + " to get below threshold of " + toM(maxPixels) + "M pixels."); } }
Began life as a copy of #1005379
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment