-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError decoding images - "not enough image data" #1814
Comments
I also just noticed calling |
adding file for test: The issue is coming from the fact that the number of bits per components is not checked. it works with it |
I've checked the data copied from Acrobat Reader and it is also unreadable. the PDF seems to have been processed to prevent data extraction |
The image issue was addressed in #1815 which was just merged to |
This issue still persist on the latest released version |
@ericgonzadev |
EnvironmentMac OS 12.6.6
Code + PDF
Tested with the following pdf: https://ufile.io/o1whh9b3 Traceback
|
thanks for sharing: Can you raise another issue (copy/paste) for you to be able to follow progress |
A ValueError is thrown (through pillow) when trying to decode certain images - when pillow tries to decode the image, it throws
not enough image data
. I have found a couple PDFs on Project Gutenberg that cause the error. One is Grimm's Fairy Tales: https://gutenberg.org/ebooks/2591Environment
Which environment were you using when you encountered the problem?
Both windows and wsl (linux)
$ python -c "import pypdf;print(pypdf.__version__)" 3.8.1
I am using pillow 9.5.0. (latest as of this report)
Code + PDF
Using the
.images
iterator causes the error:Tested with https://gutenberg.org/files/2591/old/grimm10.pdf
Traceback
This is the complete Traceback I see:
The text was updated successfully, but these errors were encountered: