Simplify the DNL (Define Number of Lines) marker warning in JpegImage.parse
This commit is contained in:
parent
620f65488b
commit
83ff7d9de9
@ -907,8 +907,7 @@ var JpegImage = (function JpegImageClosure() {
|
|||||||
offset += processed;
|
offset += processed;
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
if (ex instanceof DNLMarkerError) {
|
if (ex instanceof DNLMarkerError) {
|
||||||
warn('Attempting to re-parse JPEG image using "scanLines" ' +
|
warn(`${ex.message} -- attempting to re-parse the JPEG image.`);
|
||||||
'parameter found in DNL marker (0xFFDC) segment.');
|
|
||||||
return this.parse(data, { dnlScanLines: ex.scanLines, });
|
return this.parse(data, { dnlScanLines: ex.scanLines, });
|
||||||
} else if (ex instanceof EOIMarkerError) {
|
} else if (ex instanceof EOIMarkerError) {
|
||||||
warn(`${ex.message} -- ignoring the rest of the image data.`);
|
warn(`${ex.message} -- ignoring the rest of the image data.`);
|
||||||
|
Loading…
Reference in New Issue
Block a user