Browse Source

Support for the image mask in higher resolution than the image itself

Basil A. Zabairatsky 11 years ago
parent
commit
555d33ffc7
  1. 12
      src/core/image.js
  2. 1
      test/pdfs/.gitignore
  3. BIN
      test/pdfs/issue4246.pdf
  4. 7
      test/test_manifest.json

12
src/core/image.js

@ -228,14 +228,14 @@ var PDFImage = (function PDFImageClosure() {
PDFImage.prototype = { PDFImage.prototype = {
get drawWidth() { get drawWidth() {
if (!this.smask) return Math.max(this.width,
return this.width; this.smask && this.smask.width || 0,
return Math.max(this.width, this.smask.width); this.mask && this.mask.width || 0);
}, },
get drawHeight() { get drawHeight() {
if (!this.smask) return Math.max(this.height,
return this.height; this.smask && this.smask.height || 0,
return Math.max(this.height, this.smask.height); this.mask && this.mask.height || 0);
}, },
decodeBuffer: function PDFImage_decodeBuffer(buffer) { decodeBuffer: function PDFImage_decodeBuffer(buffer) {
var bpc = this.bpc; var bpc = this.bpc;

1
test/pdfs/.gitignore vendored

@ -66,3 +66,4 @@
!bug946506.pdf !bug946506.pdf
!issue3885.pdf !issue3885.pdf
!bug859204.pdf !bug859204.pdf
!issue4246.pdf

BIN
test/pdfs/issue4246.pdf

Binary file not shown.

7
test/test_manifest.json

@ -1561,5 +1561,12 @@
"firstPage": 4, "firstPage": 4,
"lastPage": 4, "lastPage": 4,
"type": "eq" "type": "eq"
},
{ "id": "issue4246",
"file": "pdfs/issue4246.pdf",
"md5": "ed81787b83cc317c9f049643b853bea3",
"rounds": 1,
"type": "eq",
"about": "Image mask in higher resolution than the image itself"
} }
] ]

Loading…
Cancel
Save