Simplify the DNL (Define Number of Lines) marker warning in JpegImage.parse

This commit is contained in:
Jonas Jenwald 2018-05-29 11:33:33 +02:00
parent 620f65488b
commit 83ff7d9de9

View File

@ -907,8 +907,7 @@ var JpegImage = (function JpegImageClosure() {
offset += processed;
} catch (ex) {
if (ex instanceof DNLMarkerError) {
warn('Attempting to re-parse JPEG image using "scanLines" ' +
'parameter found in DNL marker (0xFFDC) segment.');
warn(`${ex.message} -- attempting to re-parse the JPEG image.`);
return this.parse(data, { dnlScanLines: ex.scanLines, });
} else if (ex instanceof EOIMarkerError) {
warn(`${ex.message} -- ignoring the rest of the image data.`);