mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Let SMask/Mask images fallback to the parent image dimensions (issue 19611)
One of the images have a corrupt SMask, where the /Height-entry is bogus; see the excerpt below (via https://brendandahl.github.io/pdf.js.utils/browser/). ``` SMask (stream) [id: 17, gen: 0] ColorSpace = /DeviceGray Height = /Length Subtype = /Image Filter = /FlateDecode Type = /XObject Width = 157 Matte (array) BitsPerComponent = 8 Length = 3893 <view contents> download ``` Hence we enable SMask/Mask images to fallback to the parent image dimensions, and also add more validation of the width/height to get a better error message when that data is wrong.
This commit is contained in:
parent
1bc98dfbd9
commit
10a99ea0a7
3 changed files with 37 additions and 5 deletions
1
test/pdfs/issue19611.pdf.link
Normal file
1
test/pdfs/issue19611.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://github.com/user-attachments/files/19102190/test.pdf
|
|
@ -3913,6 +3913,14 @@
|
|||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "issue19611",
|
||||
"file": "pdfs/issue19611.pdf",
|
||||
"md5": "169dc6df1c43dcb4659b2ddb6a4b39e4",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "issue1127-text",
|
||||
"file": "pdfs/issue1127.pdf",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue