Class ImageUtils


  • public class ImageUtils
    extends java.lang.Object
    Utility class for image related functions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull java.awt.Image scaleImage​(@NotNull java.awt.Image image, int w, int h)
      Returns a scaled version of an Image.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • scaleImage

        @NotNull
        public static @NotNull java.awt.Image scaleImage​(@NotNull
                                                         @NotNull java.awt.Image image,
                                                         int w,
                                                         int h)
                                                  throws java.lang.InterruptedException
        Returns a scaled version of an Image. Other than Image.getScaledInstance(int, int, int), this function drops the reference to the source image.
        Parameters:
        image - the source image to scale
        w - the scaled width
        h - the scaled height
        Returns:
        the scaled image
        Throws:
        java.lang.InterruptedException - if scaling failed because the current thread was interrupted