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 result file cannot be uploaded as GitHub does not allow me uploading that large of a file.
Here is a screenshot:
Notice that this only affects colour images. Grayscale and B/W works out just fine without any distortions.
The text was updated successfully, but these errors were encountered:
radarhere
changed the title
JP2 failed to put in PDF correctly when handling color images.
JP2 failed to put in PDF correctly when handling color images
May 27, 2025
When I use Pillow to resave your image as a PDF, here is the resulting file that I get - sam.pdf
When I view the PDF, I don't see a problem. The image that you provided is in RGBA mode. This makes me think this is a recurrence of #8074, where Pillow was creating a well-formed PDF, but there is a bug in the viewer that prevents it from displaying it correctly.
What program are you using to view the PDF? What version of that software are you using?
If you view your PDF in a browser, does it display correctly?
If you are looking for a workaround, I expect converting the image to RGB will work.
What did you do?
Changing colour JP2 images from Library of Congress to PDF format.
What did you expect to happen?
Simply format change and should expect a properly showed colour pdf.
What actually happened?
Decoding faulted and resulted in overlaying pdf.
What are your OS, Python and Pillow versions?
The original image:
Barcarolle-0001.zip
The result file cannot be uploaded as GitHub does not allow me uploading that large of a file.
Here is a screenshot:
Notice that this only affects colour images. Grayscale and B/W works out just fine without any distortions.
The text was updated successfully, but these errors were encountered: