1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Access the number of components correctly in JPEG 2000 images with color space entries (issue 19326)

This small typo appears to be a regression from PR 18204.
This commit is contained in:
Jonas Jenwald 2025-01-15 10:11:57 +01:00
parent 016de74229
commit e5bc760316
4 changed files with 11 additions and 1 deletions

View file

@ -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 =