Merge pull request #16396 from Snuffleupagus/issue-16395
Improve handling of JPEG images with non-standard /Decode-entries (issue 16395)
This commit is contained in:
commit
4d3dfe254f
@ -746,7 +746,12 @@ class PDFImage {
|
||||
}
|
||||
return imgData;
|
||||
}
|
||||
if (this.image instanceof JpegStream && !this.smask && !this.mask) {
|
||||
if (
|
||||
this.image instanceof JpegStream &&
|
||||
!this.smask &&
|
||||
!this.mask &&
|
||||
!this.needsDecode
|
||||
) {
|
||||
let imageLength = originalHeight * rowBytes;
|
||||
if (isOffscreenCanvasSupported && !mustBeResized) {
|
||||
let isHandled = false;
|
||||
|
1
test/pdfs/issue16395.pdf.link
Normal file
1
test/pdfs/issue16395.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
https://github.com/mozilla/pdf.js/files/11412207/issue16395.pdf
|
@ -41,6 +41,15 @@
|
||||
"lastPage": 2,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue16395",
|
||||
"file": "pdfs/issue16395.pdf",
|
||||
"md5": "a5de985711ec27cd2a2ed97d5f1c536c",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"firstPage": 3,
|
||||
"lastPage": 3,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "tracemonkey-fbf",
|
||||
"file": "pdfs/tracemonkey.pdf",
|
||||
"md5": "9a192d8b1a7dc652a19835f6f08098bd",
|
||||
|
Loading…
Reference in New Issue
Block a user