static RGBImage rgbResize(RGBImage img, int w, int h) { if (w == img.w() && h == img.h()) ret img; ret new RGBImage(resizeImage(img.getBufferedImage(), w, h)); } static RGBImage rgbResize(RGBImage img, int w) { int h = iround(img.h()*(double) w/img.w()); ret rgbResize(img, w, h); }