mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Merge pull request #8388 from Snuffleupagus/issue-8380
Cache JPEG images, just as we do for other image formats, in `evaluator.js` (issue 8380)
This commit is contained in:
commit
5dc8dcdc0f
3 changed files with 16 additions and 3 deletions
|
@ -474,9 +474,14 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
NativeImageDecoder.isSupported(image, this.xref, resources)) {
|
||||
// These JPEGs don't need any more processing so we can just send it.
|
||||
operatorList.addOp(OPS.paintJpegXObject, args);
|
||||
this.handler.send('obj',
|
||||
[objId, this.pageIndex, 'JpegStream',
|
||||
image.getIR(this.options.forceDataSchema)]);
|
||||
this.handler.send('obj', [objId, this.pageIndex, 'JpegStream',
|
||||
image.getIR(this.options.forceDataSchema)]);
|
||||
if (cacheKey) {
|
||||
imageCache[cacheKey] = {
|
||||
fn: OPS.paintJpegXObject,
|
||||
args,
|
||||
};
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue