mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Merge pull request #16541 from Snuffleupagus/inline-image-mask-checks
Improve SMask/Mask lookup when parsing inline images
This commit is contained in:
commit
9af50dc358
1 changed files with 6 additions and 4 deletions
|
@ -724,12 +724,14 @@ class PartialEvaluator {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const softMask = dict.get("SM", "SMask") || false;
|
|
||||||
const mask = dict.get("Mask") || false;
|
|
||||||
|
|
||||||
const SMALL_IMAGE_DIMENSIONS = 200;
|
const SMALL_IMAGE_DIMENSIONS = 200;
|
||||||
// Inlining small images into the queue as RGB data
|
// Inlining small images into the queue as RGB data
|
||||||
if (isInline && !softMask && !mask && w + h < SMALL_IMAGE_DIMENSIONS) {
|
if (
|
||||||
|
isInline &&
|
||||||
|
!dict.has("SMask") &&
|
||||||
|
!dict.has("Mask") &&
|
||||||
|
w + h < SMALL_IMAGE_DIMENSIONS
|
||||||
|
) {
|
||||||
const imageObj = new PDFImage({
|
const imageObj = new PDFImage({
|
||||||
xref: this.xref,
|
xref: this.xref,
|
||||||
res: resources,
|
res: resources,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue