Here you can find the source of loadImage(File original)
private static Image loadImage(File original) throws IOException
//package com.java2s; //License from project: LGPL import java.awt.Image; import java.io.File; import java.io.IOException; import javax.swing.ImageIcon; public class Main { private static Image loadImage(File original) throws IOException { ImageIcon ii = new ImageIcon(original.getCanonicalPath()); Image i = ii.getImage();//from w ww. ja v a 2 s.c om return i; } }