Package jmri.util.davidflanagan
Class ImageUtils
java.lang.Object
jmri.util.davidflanagan.ImageUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImagegetScaledInstance(Image img, int maxWidth, int maxHeight) Scale an image down to a specified maximum width and height.
-
Constructor Details
-
ImageUtils
public ImageUtils()
-
-
Method Details
-
getScaledInstance
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.
-