1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #12766 from Snuffleupagus/issue-11004

Ignore, rather than throwing on, unsupported Coding style default (COD) options in JPEG 2000 images (issue 11004)
This commit is contained in:
Tim van der Meij 2020-12-28 20:26:10 +01:00 committed by GitHub
commit 50303fc8f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View file

@ -351,8 +351,8 @@ var JpxImage = (function JpxImageClosure() {
}
if (unsupported.length > 0) {
doNotRecover = true;
throw new Error(
"Unsupported COD options (" + unsupported.join(", ") + ")"
warn(
`JPX: Unsupported COD options (${unsupported.join(", ")}).`
);
}
if (context.mainHeader) {
@ -411,7 +411,7 @@ var JpxImage = (function JpxImageClosure() {
if (doNotRecover || this.failOnCorruptedImage) {
throw new JpxError(e.message);
} else {
warn("JPX: Trying to recover from: " + e.message);
warn(`JPX: Trying to recover from: "${e.message}".`);
}
}
this.tiles = transformComponents(context);