mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Ignore the /Mask entry in images unless its /ImageMask entry is explicitly set to true
(issue 6621)
Fixes 6621.
This commit is contained in:
parent
9455095ee9
commit
50a70429ec
4 changed files with 14 additions and 1 deletions
|
@ -140,7 +140,12 @@ var PDFImage = (function PDFImageClosure() {
|
|||
this.smask = new PDFImage(xref, res, smask, false);
|
||||
} else if (mask) {
|
||||
if (isStream(mask)) {
|
||||
this.mask = new PDFImage(xref, res, mask, false, null, null, true);
|
||||
var maskDict = mask.dict, imageMask = maskDict.get('ImageMask', 'IM');
|
||||
if (!imageMask) {
|
||||
warn('Ignoring /Mask in image without /ImageMask.');
|
||||
} else {
|
||||
this.mask = new PDFImage(xref, res, mask, false, null, null, true);
|
||||
}
|
||||
} else {
|
||||
// Color key mask (just an array).
|
||||
this.mask = mask;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue