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