sclass BWIntegralImageMaker1 implements IBWIntegralImageMaker { public IBWIntegralImage toBWIntegralImage(BufferedImage image) { //if (image.getRaster().getSampleModel() instanceof PixelInterleavedSampleModel) // gray image if (is8BitGrayscale(image)) ret new BWIntegralImage(grabbableGrayPixels(image)); else { // rgb image ret new BWIntegralImage(grabbableIntPixels_fastOrSlow(image)); // broken!? var gray = rgbToGrayUsingImageTypeAndDrawImage(image); // grab(grabbableGrayPixels(gray)); } } }