Merge pull request #6366 from Snuffleupagus/issue-6364

Only take the fast-path in `PDFImage_createImageData` for un-masked JPEG images with "standard" colour spaces (issue 6364)
This commit is contained in:
Yury Delendik 2015-08-18 16:02:50 -05:00
commit f9c2783c36
4 changed files with 24 additions and 1 deletions

View File

@ -562,7 +562,10 @@ var PDFImage = (function PDFImageClosure() {
}
return imgData;
}
if (this.image instanceof JpegStream && !this.smask && !this.mask) {
if (this.image instanceof JpegStream && !this.smask && !this.mask &&
(this.colorSpace.name === 'DeviceGray' ||
this.colorSpace.name === 'DeviceRGB' ||
this.colorSpace.name === 'DeviceCMYK')) {
imgData.kind = ImageKind.RGB_24BPP;
imgData.data = this.getImageBytes(originalHeight * rowBytes,
drawWidth, drawHeight, true);

View File

@ -0,0 +1 @@
http://web.archive.org/web/20150502102155/http://sunnuclear.com/documents/DQA3.pdf

View File

@ -0,0 +1 @@
http://web.archive.org/web/20150818180340/http://www.rightprospectus.com/documents/Osterweis/SEMI_Osterweis.pdf

View File

@ -1487,6 +1487,24 @@
"link": true,
"type": "eq"
},
{ "id": "issue6364",
"file": "pdfs/issue6364.pdf",
"md5": "b290328531ecdddf6b4c794b4b2fec28",
"rounds": 1,
"link": true,
"firstPage": 1,
"lastPage": 1,
"type": "eq"
},
{ "id": "issue4890",
"file": "pdfs/issue4890.pdf",
"md5": "1666feb4cd26318c2bdbea6a175dce87",
"rounds": 1,
"link": true,
"firstPage": 1,
"lastPage": 1,
"type": "eq"
},
{ "id": "bug898853.pdf",
"file": "pdfs/bug898853.pdf",
"md5": "37c37702bf98d33f9f74e2380c4d1a3f",