Java BufferedImage Load loadImage(String image)

Here you can find the source of loadImage(String image)

Description

Loads an image

License

Open Source License

Parameter

Parameter Description
image a parameter

Exception

Parameter Description
Exception an exception

Declaration

public static BufferedImage loadImage(String image) throws Exception 

Method Source Code

//package com.java2s;
/*/*from ww  w . j  a  v  a  2  s  .c  om*/
 *    leola-live 
 *  see license.txt
 */

import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;

public class Main {
    /**
     * Loads an image
     *
     * @param image
     * @return
     * @throws Exception
     */
    public static BufferedImage loadImage(String image) throws Exception {
        return ImageIO.read(new File(image));
    }
}

Related

  1. loadImage(String fileName)
  2. loadImage(String fileName, Component c)
  3. loadImage(String fileName, Component component)
  4. loadImage(String filePath)
  5. loadImage(String i, int x, int imageWidth, int imageHeight)
  6. loadImage(String imageName)
  7. loadImage(String imageName, Component c)
  8. loadImage(String path)
  9. loadImage(String path)