mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Enable/disable image smoothing based on image interpolate value. (bug 1722191)
While some of the output looks worse to my eye, this behavior more closely matches what I see when I open the PDFs in Adobe acrobat. Fixes: #4706, #9713, #8245, #1344
This commit is contained in:
parent
8a79f13e5a
commit
f38fb42b42
13 changed files with 74 additions and 9 deletions
|
@ -589,6 +589,7 @@ class PartialEvaluator {
|
|||
}
|
||||
|
||||
const imageMask = dict.get("ImageMask", "IM") || false;
|
||||
const interpolate = dict.get("Interpolate", "I");
|
||||
let imgData, args;
|
||||
if (imageMask) {
|
||||
// This depends on a tmpCanvas being filled with the
|
||||
|
@ -612,6 +613,7 @@ class PartialEvaluator {
|
|||
height,
|
||||
imageIsFromDecodeStream: image instanceof DecodeStream,
|
||||
inverseDecode: !!decode && decode[0] > 0,
|
||||
interpolate,
|
||||
});
|
||||
imgData.cached = !!cacheKey;
|
||||
args = [imgData];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue