Here you can find the source of loadImage(String filePath)
Parameter | Description |
---|---|
filePath | a parameter |
public static BufferedImage loadImage(String filePath)
//package com.java2s; //License from project: Apache License import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; public class Main { /**/* ww w . jav a 2s .c om*/ * load image * * @param filePath * @return */ public static BufferedImage loadImage(String filePath) { try { return ImageIO.read(new File(filePath)); } catch (Exception e) { throw new RuntimeException(e); } } }