Merge pull request #12753 from Snuffleupagus/issue-12752
Ignore, rather than throwing on, Coding style component (COC) markers in JPEG 2000 images (issue 12752)
This commit is contained in:
commit
b7fc916f48
@ -392,6 +392,9 @@ var JpxImage = (function JpxImageClosure() {
|
|||||||
length = tile.dataEnd - position;
|
length = tile.dataEnd - position;
|
||||||
parseTilePackets(context, data, position, length);
|
parseTilePackets(context, data, position, length);
|
||||||
break;
|
break;
|
||||||
|
case 0xff53: // Coding style component (COC)
|
||||||
|
warn("JPX: Codestream code 0xFF53 (COC) is not implemented.");
|
||||||
|
/* falls through */
|
||||||
case 0xff55: // Tile-part lengths, main header (TLM)
|
case 0xff55: // Tile-part lengths, main header (TLM)
|
||||||
case 0xff57: // Packet length, main header (PLM)
|
case 0xff57: // Packet length, main header (PLM)
|
||||||
case 0xff58: // Packet length, tile-part header (PLT)
|
case 0xff58: // Packet length, tile-part header (PLT)
|
||||||
@ -399,10 +402,6 @@ var JpxImage = (function JpxImageClosure() {
|
|||||||
length = readUint16(data, position);
|
length = readUint16(data, position);
|
||||||
// skipping content
|
// skipping content
|
||||||
break;
|
break;
|
||||||
case 0xff53: // Coding style component (COC)
|
|
||||||
throw new Error(
|
|
||||||
"Codestream code 0xFF53 (COC) is not implemented"
|
|
||||||
);
|
|
||||||
default:
|
default:
|
||||||
throw new Error("Unknown codestream code: " + code.toString(16));
|
throw new Error("Unknown codestream code: " + code.toString(16));
|
||||||
}
|
}
|
||||||
|
1
test/pdfs/issue12752.pdf.link
Normal file
1
test/pdfs/issue12752.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
https://github.com/mozilla/pdf.js/files/5715933/WE2330Ausweis_2.pdf
|
@ -2045,6 +2045,14 @@
|
|||||||
"link": true,
|
"link": true,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue12752",
|
||||||
|
"file": "pdfs/issue12752.pdf",
|
||||||
|
"md5": "9f8ada17a613d18919714baf684e165f",
|
||||||
|
"rounds": 1,
|
||||||
|
"lastPage": 1,
|
||||||
|
"link": true,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "issue7872",
|
{ "id": "issue7872",
|
||||||
"file": "pdfs/issue7872.pdf",
|
"file": "pdfs/issue7872.pdf",
|
||||||
"md5": "81781dfecfcb7e9cd9cc7e60f8b747b7",
|
"md5": "81781dfecfcb7e9cd9cc7e60f8b747b7",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user