Class ImageLoader


  • public final class ImageLoader
    extends Object
    Loads images from various sources. Typically we first try the standard ImageIO.read(...) method, then fall back to using Java Advanced Imaging Library (JAI), in order to catch this problem.
    Author:
    Hendrik Schreiber
    • Method Detail

      • load

        public static Image load​(File file)
      • load

        public static Image load​(Path file)
      • getImage

        public static Image getImage​(String resourceName,
                                     Class<?> klass)
        Loads an image from either the given class's package or the resource tree of the Mac App Bundle.
        Parameters:
        resourceName - resource name
        klass - class which package should be searched
        Returns:
        image, if found