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 [PNG specification] only mentions bytes, not bits. The apply_png_predictor() needs a lot of rework when it needs to be applied on bits instead of bytes. But it might be easier if your PNG does not use a filter, which does make sense if it only uses bits. Can you check the filter type?
Hi Pietermarsman,
I removed the element that throws the error and it successful saved the image to .btm while this was not readable when I used pillow to convert it to JPG it could now be displayed , it seems that the code around line 136 of "utils.py " should be amended as a bits per component of 1 is supported.
Hi,
I'm trying to read the images off a scanned pdf to conduct OCR on them , I can't include this PDF for data privacy reasons.
General code run -
Error given
ValueError: Unsupported `bitspercomponent': 1
Hi,
It is possible to have one bit per component PNGs especially with scanned pdfs
in the section https://github.com/pdfminer/pdfminer.six/blob/master/pdfminer/utils.py
please look at the page here https://stackoverflow.com/questions/757265/how-does-pdfs-bitspercomponent-translate-to-bits-per-pixel-for-images
some work needs to be performed to insure correct images can be extracted
The text was updated successfully, but these errors were encountered: