Class ImageUtils

java.lang.Object
jmri.util.davidflanagan.ImageUtils

public class ImageUtils extends Object
  • Constructor Details

  • Method Details

    • getScaledInstance

      public static Image getScaledInstance(Image img, int maxWidth, int maxHeight)
      Scale an image down to a specified maximum width and height. This does multiple downscaling steps to avoid rendering issues with large images.
      Parameters:
      img - The image to scale down.
      maxWidth - The maximum width of the scaled image.
      maxHeight - The maximum height of the scaled image.
      Returns:
      The scaled image.