static int widthToHeight(int w, int h, int newWidth) { ret heightForWidth(w, h, newWidth); } meta-for BufferedImage also as WidthAndHeight { static int widthToHeight(BufferedImage img, int newWidth) { ret heightForWidth(img.getWidth(), img.getHeight(), newWidth); } static int widthToHeight(int newWidth, BufferedImage img) { ret widthToHeight(img, newWidth); } }