mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Only take the fast-path in PDFImage_createImageData
for un-masked JPEG images with "standard" colour spaces (issue 6364)
Fixes 6364.
This commit is contained in:
parent
421289c7bc
commit
3fa5f6cc3b
3 changed files with 14 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue