read from file directly

master
melvin 2011-07-29 10:34:55 +08:00
parent 11dddc9c9b
commit 4f0298c145
1 changed files with 1 additions and 3 deletions

View File

@ -45,9 +45,7 @@ public class AvatarImages {
private PlayerAvatar loadAvatar(final File file) {
BufferedImage image;
try {
final InputStream stream=new FileInputStream(file);
image=ImageIO.read(stream);
stream.close();
image=ImageIO.read(file);
} catch (final Exception ex) {
image=IconImages.MISSING;
}