diff --git a/source/net/yacy/document/ImageParser.java b/source/net/yacy/document/ImageParser.java index d10058dda..fa8a50f59 100644 --- a/source/net/yacy/document/ImageParser.java +++ b/source/net/yacy/document/ImageParser.java @@ -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();