Here you can find the source of getBufferedImage(File file)
public static BufferedImage getBufferedImage(File file)
//package com.java2s; //License from project: Open Source License import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class Main { public static BufferedImage getBufferedImage(File file) { try {/* w w w. j ava 2s .c o m*/ return ImageIO.read(file); } catch (IOException e) { e.printStackTrace(); } return null; } }