!752 static BWImage img; static ImageSurface is2; static float threshold = 0.99f; // for horizontalAutoSplit p { img = loadBWImage("#1005702"); update(); } svoid update() { RGBImage vis = visualize().toRGB(); if (is2 == null) { is2 = showZoomedImage(vis); addToWindowAndPack(is2, liveSliderZeroToOne(threshold/10000f*9999f, voidfunc(float x) { threshold = x*10000f/9999f; update(); })); } else is2.setImage(vis); } static BWImage visualize() { BWImage im = new BWImage(img); for (Rect r : horizontalAutoSplit(img, threshold)) { r = autoCropOfBWImage(img, r); darkenBWImagePart(im, r); } ret im; }