Package net.sf.gridarta.utils
Class ImageUtils
- java.lang.Object
-
- net.sf.gridarta.utils.ImageUtils
-
public class ImageUtils extends java.lang.ObjectUtility class for image related functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull java.awt.ImagescaleImage(@NotNull java.awt.Image image, int w, int h)Returns a scaled version of anImage.
-
-
-
Method Detail
-
scaleImage
@NotNull public static @NotNull java.awt.Image scaleImage(@NotNull @NotNull java.awt.Image image, int w, int h) throws java.lang.InterruptedExceptionReturns a scaled version of anImage. Other thanImage.getScaledInstance(int, int, int), this function drops the reference to the source image.- Parameters:
image- the source image to scalew- the scaled widthh- the scaled height- Returns:
- the scaled image
- Throws:
java.lang.InterruptedException- if scaling failed because the current thread was interrupted
-
-