mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-02 00:01:01 +02:00
Use a black backdrop for Luminosity SMasks when /BC is missing
It fixes #21346.
This commit is contained in:
parent
03eda70d7e
commit
a33e06cafb
@ -544,6 +544,11 @@ class PartialEvaluator {
|
||||
if (smask?.backdrop) {
|
||||
colorSpace ||= ColorSpaceUtils.rgb;
|
||||
smask.backdrop = colorSpace.getRgbHex(smask.backdrop, 0);
|
||||
} else if (smask?.subtype === "Luminosity") {
|
||||
// Per PDF spec 11.6.5.2: when /BC is missing the backdrop is the
|
||||
// initial value of the group colour space, which is black for all
|
||||
// standard colour spaces.
|
||||
smask.backdrop = "#000000";
|
||||
}
|
||||
|
||||
newOpList = new CheckedOperatorList();
|
||||
|
||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -925,3 +925,4 @@
|
||||
!issue18548_reduced.pdf
|
||||
!issue_cff_unsigned_bbox.pdf
|
||||
!90ms_rksj_h_sample.pdf
|
||||
!issue21346.pdf
|
||||
|
||||
BIN
test/pdfs/issue21346.pdf
Normal file
BIN
test/pdfs/issue21346.pdf
Normal file
Binary file not shown.
@ -14327,5 +14327,12 @@
|
||||
"md5": "d2606e2c6cc9e679b8b88c2800c6e1a9",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "issue21346",
|
||||
"file": "pdfs/issue21346.pdf",
|
||||
"md5": "16b39d943d268ebfa99ee57f1f470f53",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user