static BufferedImage pixelateImage( int tempWidth, int tempHeight default max(1, heightForWidth(tempWidth, img)), BufferedImage img) { int w = img.getWidth(), h = img.getHeight(); var img2 = scaledBufferedImageFromIntegralImage(tempWidth, tempHeight, IntegralImage(img)); ret scaleBufferedImagePixelated(img2, w, h); }