Extracting a PNG image from a PDF results in broken output, almost looking like a misinterpreting of colour value range. No exception is thrown.
Environment
Which environment were you using when you encountered the problem?
$ python -m platform
Linux-6.17.0-29-generic-x86_64-with-glibc2.39
$ python -c "import pypdf;print(pypdf._debug_versions)"
pypdf==6.14.2, crypt_provider=('local_crypt_fallback', '0.0.0'), PIL=12.2.0
Code + PDF
This is a minimal, complete example that shows the issue:
from pypdf import PdfReader
reader = PdfReader("1:10000.pdf")
image = reader.pages[0].images[0]
image.image.save("out.png")
Share here the PDF file(s) that cause the issue. The smaller they are, the
better. Let us know if we may add them to our tests!
1:10000.pdf
Traceback
This is the complete traceback I see:
None
Extracting a PNG image from a PDF results in broken output, almost looking like a misinterpreting of colour value range. No exception is thrown.
Environment
Which environment were you using when you encountered the problem?
Code + PDF
This is a minimal, complete example that shows the issue:
Share here the PDF file(s) that cause the issue. The smaller they are, the
better. Let us know if we may add them to our tests!
1:10000.pdf
Traceback
This is the complete traceback I see:
None