fix: eom on parsing ico file by genericImageParser

trace: java.lang.OutOfMemoryError: Java heap space
	at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
	at java.awt.image.Raster.createPackedRaster(Raster.java:467)
	at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032)
	at java.awt.image.BufferedImage.<init>(BufferedImage.java:331)
	at net.yacy.document.parser.images.bmpParser$IMAGEMAP.<init>(bmpParser.java:149)
	at net.yacy.document.parser.images.bmpParser.parse(bmpParser.java:69)
	at net.yacy.document.parser.images.genericImageParser.parse(genericImageParser.java:116)
pull/1/head
reger 10 years ago
parent 42b0672be3
commit 5ca0762179

@ -113,8 +113,12 @@ public class genericImageParser extends AbstractParser implements Parser {
ConcurrentLog.logException(e);
throw new Parser.Failure(e.getMessage(), location);
}
if (bmpParser.isBMP(b)) {
final IMAGEMAP imap = bmpParser.parse(b);
ii = parseJavaImage(location, imap.getImage());
} else {
throw new Parser.Failure("Not supported by bmpParser", location);
}
} else if (mimeType.equals("image/jpeg") || ext.equals("jpg") || ext.equals("jpeg") || ext.equals("jpe")) {
// use the exif parser from
// http://www.drewnoakes.com/drewnoakes.com/code/exif/

Loading…
Cancel
Save