static float[] bwImageColumnBrightnesses_generic(virtual BWImage img) { int w = img.getWidth(), h = img.getHeight(); float[] f = new float[w]; for x to w: f[x] = toFloat(rcall averageBrightness(rcall clip(img, x, 0, 1, h))); ret f; }