Class ImageUtils


  • public class ImageUtils
    extends Object
    This ImageUtils class contains parts from: ://flyingdogz.wordpress.com/2008/02/11/image-rotate-in-java-2-easier-to-use/
    • Constructor Detail

      • ImageUtils

        public ImageUtils()
    • Method Detail

      • createImageIcon

        public static ImageIcon createImageIcon​(Class<?> clazz,
                                                String path)
        Returns an ImageIcon, or null if the path was invalid.
        Parameters:
        clazz - the class
        path - the path
        Returns:
        the image or null if path was invalid
      • loadImageIcon

        public static ImageIcon loadImageIcon​(Class<?> clazz,
                                              String path,
                                              int width,
                                              int height)
      • rotateImage

        public static Image rotateImage​(Image img,
                                        double degree)
      • hasAlpha

        public static boolean hasAlpha​(Image image)