Browse Source

PDF.js version 1.0.712

master v1.0.712
Yury Delendik 11 years ago
parent
commit
a43609d45b
  1. 2
      bower.json
  2. 17
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 17
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.710", "version": "1.0.712",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",
"pdf", "pdf",

17
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.710'; PDFJS.version = '1.0.712';
PDFJS.build = '0dbac15'; PDFJS.build = '6969ed4';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -32457,10 +32457,11 @@ var PDFImage = (function PDFImageClosure() {
var kind; var kind;
if (this.colorSpace.name === 'DeviceGray' && bpc === 1) { if (this.colorSpace.name === 'DeviceGray' && bpc === 1) {
kind = ImageKind.GRAYSCALE_1BPP; kind = ImageKind.GRAYSCALE_1BPP;
} else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8) { } else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8 &&
!this.needsDecode) {
kind = ImageKind.RGB_24BPP; kind = ImageKind.RGB_24BPP;
} }
if (kind && !this.smask && !this.mask && !this.needsDecode && if (kind && !this.smask && !this.mask &&
drawWidth === originalWidth && drawHeight === originalHeight) { drawWidth === originalWidth && drawHeight === originalHeight) {
imgData.kind = kind; imgData.kind = kind;
@ -32477,6 +32478,14 @@ var PDFImage = (function PDFImageClosure() {
newArray.set(imgArray); newArray.set(imgArray);
imgData.data = newArray; imgData.data = newArray;
} }
if (this.needsDecode) {
// Invert the buffer (which must be grayscale if we reached here).
assert(kind === ImageKind.GRAYSCALE_1BPP);
var buffer = imgData.data;
for (var i = 0, ii = buffer.length; i < ii; i++) {
buffer[i] ^= 0xff;
}
}
return imgData; return imgData;
} }
if (this.image instanceof JpegStream && !this.smask && !this.mask) { if (this.image instanceof JpegStream && !this.smask && !this.mask) {

4
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.710'; PDFJS.version = '1.0.712';
PDFJS.build = '0dbac15'; PDFJS.build = '6969ed4';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

17
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.710'; PDFJS.version = '1.0.712';
PDFJS.build = '0dbac15'; PDFJS.build = '6969ed4';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -26427,10 +26427,11 @@ var PDFImage = (function PDFImageClosure() {
var kind; var kind;
if (this.colorSpace.name === 'DeviceGray' && bpc === 1) { if (this.colorSpace.name === 'DeviceGray' && bpc === 1) {
kind = ImageKind.GRAYSCALE_1BPP; kind = ImageKind.GRAYSCALE_1BPP;
} else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8) { } else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8 &&
!this.needsDecode) {
kind = ImageKind.RGB_24BPP; kind = ImageKind.RGB_24BPP;
} }
if (kind && !this.smask && !this.mask && !this.needsDecode && if (kind && !this.smask && !this.mask &&
drawWidth === originalWidth && drawHeight === originalHeight) { drawWidth === originalWidth && drawHeight === originalHeight) {
imgData.kind = kind; imgData.kind = kind;
@ -26447,6 +26448,14 @@ var PDFImage = (function PDFImageClosure() {
newArray.set(imgArray); newArray.set(imgArray);
imgData.data = newArray; imgData.data = newArray;
} }
if (this.needsDecode) {
// Invert the buffer (which must be grayscale if we reached here).
assert(kind === ImageKind.GRAYSCALE_1BPP);
var buffer = imgData.data;
for (var i = 0, ii = buffer.length; i < ii; i++) {
buffer[i] ^= 0xff;
}
}
return imgData; return imgData;
} }
if (this.image instanceof JpegStream && !this.smask && !this.mask) { if (this.image instanceof JpegStream && !this.smask && !this.mask) {

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.710", "version": "1.0.712",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",

Loading…
Cancel
Save