added log lines

pull/23/head
Michael Peter Christen 9 years ago
parent 092dac086e
commit 7d075a1d76

@ -40,7 +40,12 @@ public class ImageParser {
if (((filename.endsWith(".ico")) || (filename.endsWith(".bmp"))) && (bmpParser.isBMP(source))) {
// parse image with BMP parser
image = bmpParser.parse(source).getImage();
if (image == null) return null;
if (image == null) {
if (ConcurrentLog.isFine("IMAGEPARSER")) {
ConcurrentLog.fine("IMAGEPARSER", "IMAGEPARSER.parse : bmpParser failed for " + filename);
}
return null;
}
} else if ((filename.endsWith(".ico")) && (icoParser.isICO(source))) {
// parse image with ICO parser
icoParser icoparser;
@ -52,7 +57,12 @@ public class ImageParser {
ConcurrentLog.fine("IMAGEPARSER", "IMAGEPARSER.parse : could not parse image " + filename, e);
}
}
if (image == null) return null;
if (image == null) {
if (ConcurrentLog.isFine("IMAGEPARSER")) {
ConcurrentLog.fine("IMAGEPARSER", "IMAGEPARSER.parse : icoParser failed for " + filename);
}
return null;
}
} else {
try {
image = ImageIO.read(new ByteArrayInputStream(source));
@ -61,6 +71,12 @@ public class ImageParser {
ConcurrentLog.fine("IMAGEPARSER", "IMAGEPARSER.parse : could not parse image " + filename, e);
}
}
if (image == null) {
if (ConcurrentLog.isFine("IMAGEPARSER")) {
ConcurrentLog.fine("IMAGEPARSER", "IMAGEPARSER.parse : ImageIO failed for " + filename);
}
return null;
}
}
final int handle = image.hashCode();

Loading…
Cancel
Save