static long totalPixelCount(L l) { long sum = 0; for (O o : l) sum += totalPixelCount(o); ret sum; } static long totalPixelCount(O o) { if (o << BWImage) ret o/BWImage.getWidth()*o/BWImage.getHeight(); ret 0L; }