diff --git a/src/core/image.js b/src/core/image.js index d384935d7..7ab44bcf9 100644 --- a/src/core/image.js +++ b/src/core/image.js @@ -219,7 +219,9 @@ class PDFImage { this.numComps = this.colorSpace.numComps; if (this.jpxDecoderOptions) { - this.jpxDecoderOptions.numComponents = hasColorSpace ? this.numComp : 0; + this.jpxDecoderOptions.numComponents = hasColorSpace + ? this.numComps + : 0; // If the jpx image has a color space then it musn't be used in order to // be able to use the color space that comes from the pdf. this.jpxDecoderOptions.isIndexedColormap = diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 3cfd7a0e0..74bc63780 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -529,6 +529,7 @@ !bug1743245.pdf !quadpoints.pdf !transparent.pdf +!issue19326.pdf !issue13931.pdf !xobject-image.pdf !issue15441.pdf diff --git a/test/pdfs/issue19326.pdf b/test/pdfs/issue19326.pdf new file mode 100644 index 000000000..800d86883 Binary files /dev/null and b/test/pdfs/issue19326.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 89ab0677c..71751285b 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -6364,6 +6364,13 @@ "type": "eq", "about": "Fixes one part of bug 1731483." }, + { + "id": "issue19326", + "file": "pdfs/issue19326.pdf", + "md5": "b4d937017daf439a6318501428e0c6ba", + "rounds": 1, + "type": "eq" + }, { "id": "bug1140761", "file": "pdfs/bug1140761.pdf",