Wrong pdftocairo rendering of JPX images with transparency
pdftocairo
incorrectly renders PDF files which contain JPX images with transparency. I tested this with the latest master
branch being linked to the dependencies currently shipped on Ubuntu 22.04, built using cmake -DENABLE_NSS3=OFF -DENABLE_GPGME=OFF -DENABLE_QT6=OFF -DENABLE_LCMS=OFF -DENABLE_LIBCURL=OFF .
The latest Cairo code shows the same behavior as well: https://github.com/stefan6419846/poppler_cairo_001/blob/main/.github/workflows/check.yml
Example file: out2.pdf
Output from calling ./utils/pdftocairo -jpeg out2.pdf
:
Expected rendering (original input file):
For reference: This initially started within the Pillow project which generated this PDF file, but it seems like it mostly is an issue with the used rendering engine, especially pdftocairo
and pdf.js
: https://github.com/python-pillow/Pillow/issues/8074