-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
What did you do?
from PIL import Image
p=Image.open("e:/Downloads/pillow_putalpha_circle_blur.jp2")
p.save("e:/Downloads/pillow_putalpha_circle_blur.pdf")test file
pillow_putalpha_circle_blur.zip
What did you expect to happen?
PDF with RGBA image encoded with JPXDecode filter
What actually happened?
Traceback (most recent call last):
File "<pyshell#268>", line 1, in <module>
p.save("e:/Downloads/pillow_putalpha_circle_blur.pdf")
File "C:\Python310\lib\site-packages\PIL\Image.py", line 2300, in save
save_handler(self, fp, filename)
File "C:\Python310\lib\site-packages\PIL\PdfImagePlugin.py", line 155, in _save
raise ValueError(f"cannot save mode {im.mode}")
ValueError: cannot save mode RGBA
What are your OS, Python and Pillow versions?
- OS: windows 11
- Python: 3.10.4
- Pillow: 9.1.1