Skip to content
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: unsupported colorspace for 'png' #284

Open
bikerr opened this issue Apr 26, 2024 · 0 comments
Open

ValueError: unsupported colorspace for 'png' #284

bikerr opened this issue Apr 26, 2024 · 0 comments

Comments

@bikerr
Copy link

bikerr commented Apr 26, 2024

File "/usr/local/lib/python3.7/site-packages/pdf2docx/page/RawPage.py", line 67, in restore
    raw_dict = self.extract_raw_dict(**settings)
  File "/usr/local/lib/python3.7/site-packages/pdf2docx/page/RawPageFitz.py", line 33, in extract_raw_dict
    image_blocks = self._preprocess_images(**settings)
  File "/usr/local/lib/python3.7/site-packages/pdf2docx/page/RawPageFitz.py", line 118, in _preprocess_images
    return ImagesExtractor(self.page_engine).extract_images(settings['clip_image_res_ratio'])
  File "/usr/local/lib/python3.7/site-packages/pdf2docx/image/ImagesExtractor.py", line 159, in extract_images
    raw_dict = self._to_raw_dict(pix, bbox)
  File "/usr/local/lib/python3.7/site-packages/pdf2docx/image/ImagesExtractor.py", line 239, in _to_raw_dict
    'image': image.tobytes()
  File "/usr/local/lib/python3.7/site-packages/fitz/fitz.py", line 7300, in tobytes
    raise ValueError("unsupported colorspace for '%s'" % output)
ValueError: unsupported colorspace for 'png'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant