docs: @Deprecated
      public static PlanarImage progressiveScaleImage(PlanarImage input, int targetWidth, int targetHeight, Object hint,
                                                      boolean progressive) {
          BufferedImage img = input.getAsBufferedImage();
          int type = (img.getTransparency() == Transparency.OPAQUE) ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB;
          BufferedImage ret = img;
          BufferedImage scratchImage = null;
          Graphics2D g2 = null;
          int w, h;
          int prevW = ret.getWidth();
          int prevH = ret.getHeight();
          boolean isTranslucent = img.getTransparency() != Transparency.OPAQUE;
  
          if (progressive) {
              // Use multi-step technique: start with original size, then
              // scale down in multiple passes with drawImage()
              // until the target size is reached
              w = img.getWidth();
              h = img.getHeight();
          } else {
              // Use one-step technique: scale directly from original
              // size to target size with a single drawImage() call
              w = targetWidth;
              h = targetHeight;
          }
  
          do {
              if (progressive && w > targetWidth) {
                  w /= 2;
                  if (w < targetWidth) {
                      w = targetWidth;
                  }
              }
  
              if (progressive && h > targetHeight) {
                  h /= 2;
                  if (h < targetHeight) {
                      h = targetHeight;
                  }
              }
  
              if (scratchImage == null || isTranslucent) {
                  // Use a single scratch buffer for all iterations
                  // and then copy to the final, correctly-sized image
                  // before returning
                  scratchImage = new BufferedImage(w, h, type);
                  g2 = scratchImage.createGraphics();
              }
              g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);
              g2.drawImage(ret, 0, 0, w, h, 0, 0, prevW, prevH, null);
              prevW = w;
              prevH = h;
  
              ret = scratchImage;
          } while (w != targetWidth || h != targetHeight);
  
          if (g2 != null) {
              g2.dispose();
          }
  
          // If we used a scratch buffer that is larger than our target size,
          // create an image of the right size and copy the results into it
          if (targetWidth != ret.getWidth() || targetHeight != ret.getHeight()) {
              scratchImage = new BufferedImage(targetWidth, targetHeight, type);
              g2 = scratchImage.createGraphics();
              g2.drawImage(ret, 0, 0, null);
              g2.dispose();
              ret = scratchImage;
          }
  
          return new RenderedImageAdapter(ret);
      }