You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The image doesn't render, with the following console output:
Warning: Unable to decode image "img_p0_2": "IndexSizeError: Index or size is negative or greater than the allowed amount". [pdf.worker.mjs:348:13](resource://pdf.js/build/pdf.worker.mjs)
Warning: Dependent image isn't ready yet [pdf.mjs:391:13](resource://pdf.js/build/pdf.mjs)
Link to a viewer
No response
Additional context
196affd8e06148041b885ce63df260e4dab5f8e1 is the first bad commit
commit 196affd8e06148041b885ce63df260e4dab5f8e1
Author: Calixte Denizet <calixte.denizet@gmail.com>
Date: Mon Jun 3 16:09:26 2024 +0200
Fix decoding of JPX images having an alpha channel
When an image has a non-zero SMaskInData it means that the image
has an alpha channel.
With JPX images, the colorspace isn't required (by spec) so when we
don't have it, the JPX decoder will handle the conversion in RGBA
format.
external/openjpeg/openjpeg.js | 2 +-
src/core/base_stream.js | 4 +--
src/core/colorspace.js | 22 ++++++++++++
src/core/decode_stream.js | 12 +++----
src/core/flate_stream.js | 2 +-
src/core/image.js | 82 ++++++++++++++++++++++++++++++------------
src/core/jpx.js | 5 +--
src/core/jpx_stream.js | 8 ++---
test/pdfs/isssue18194.pdf.link | 1 +
test/pdfs/issue11306.pdf.link | 1 +
test/pdfs/issue16782.pdf.link | 1 +
test/test_manifest.json | 25 +++++++++++++
12 files changed, 126 insertions(+), 39 deletions(-)
create mode 100644 test/pdfs/isssue18194.pdf.link
create mode 100644 test/pdfs/issue11306.pdf.link
create mode 100644 test/pdfs/issue16782.pdf.link
Please note: The PDF document renders a bit slow, given the large images, however that's already tracked in #17427.
Attach (recommended) or Link to PDF file
https://sbc.org.pl/Content/403918/PDF/539_2671.pdf
Web browser and its version
N/A
Operating system and its version
N/A
PDF.js version
Any version after #18204
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
Load the linked PDF document in the viewer.
What is the expected behavior?
That the image is correctly rendered.
What went wrong?
The image doesn't render, with the following console output:
Link to a viewer
No response
Additional context
Please note: The PDF document renders a bit slow, given the large images, however that's already tracked in #17427.
/cc @calixteman
The text was updated successfully, but these errors were encountered: