23 lines
418 B
Java
Raw Normal View History

2015-02-14 17:48:55 -05:00
package milleniumlegacy;
import java.awt.image.BufferedImage;
2015-02-14 20:53:36 -05:00
import java.io.FileInputStream;
2015-02-14 17:48:55 -05:00
import java.io.IOException;
import javax.imageio.ImageIO;
public class ImageLoader
{
public BufferedImage loadImage (String path)
{
try {
2015-02-15 07:38:55 -05:00
BufferedImage bi = ImageIO.read(new FileInputStream(path));
2015-02-14 17:48:55 -05:00
return bi;
} catch (IOException e) {
System.out.println("Error loading Image");
}
return null;
}
}