mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Use a cache to minimize the number of Name objects.
This commit is contained in:
parent
cab5d7b96f
commit
fdb7c218da
8 changed files with 18 additions and 14 deletions
|
@ -88,7 +88,7 @@ var PDFImage = (function PDFImageClosure() {
|
|||
var colorSpace = dict.get('ColorSpace', 'CS');
|
||||
if (!colorSpace) {
|
||||
warn('JPX images (which don"t require color spaces');
|
||||
colorSpace = new Name('DeviceRGB');
|
||||
colorSpace = Name.get('DeviceRGB');
|
||||
}
|
||||
this.colorSpace = ColorSpace.parse(colorSpace, xref, res);
|
||||
this.numComps = this.colorSpace.numComps;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue