mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Improve handling of JPEG images with non-standard /Decode-entries (issue 16395)
The /Decode-implementation in the our JPEG decoder, i.e. `src/core/jpg.js`, seems to only handle *inverting* of images properly. To support arbitrary /Decode-entries correctly we'll always use the `PDFImage.decodeBuffer` method, even for "simple" JPEG images, which should be fine since non-default /Decode-entries aren't a very common occurrence. *Please note:* This patch will lead to a little bit of movement in some existing test-cases, however it should be virtually imperceivable to the naked eye.
This commit is contained in:
parent
3aa96e071b
commit
722e5910e1
3 changed files with 16 additions and 1 deletions
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…
Add table
Add a link
Reference in a new issue