docs: public static BufferedImage getScaledInstance(BufferedImage image, int targetWidth, int targetHeight) {
          int type = (image.getTransparency() == Transparency.OPAQUE)
                  ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB;
          BufferedImage tmp = new BufferedImage(targetWidth, targetHeight, type);
          Graphics2D g2 = tmp.createGraphics();
          g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
          g2.drawImage(image, 0, 0, targetWidth, targetHeight, null);
          g2.dispose();
          return tmp;
      }