Ejemplo n.º 1
0
 /**
  * Resize input image so that its size matches the optimal image size boundary.
  *
  * @param image The input image to be resized.
  * @return The resized image matching the optimal size boundary.
  */
 public static BufferedImage resize(BufferedImage image) {
   double divider =
       Math.max(
           (double) image.getWidth() / settingsManager.getOptimalWidth(),
           (double) image.getHeight() / settingsManager.getOptimalHeight());
   return resize(image, (int) (image.getWidth() / divider), (int) (image.getHeight() / divider));
 }