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

SVG Images break #3

Open
chahu opened this issue Nov 22, 2022 · 0 comments
Open

SVG Images break #3

chahu opened this issue Nov 22, 2022 · 0 comments

Comments

@chahu
Copy link

chahu commented Nov 22, 2022

I believe PIL doesn't support svg images which is why a pptx with an svg will fail. Probably better to skip the file if it's unsupported rather than die with an exception.

Traceback (most recent call last):
  File "/home/chahu/.local/bin/pptx-downsizer", line 8, in <module>
    sys.exit(cli())
  File "/home/chahu/.local/lib/python3.10/site-packages/pptx_downsizer/pptx_downsizer.py", line 466, in cli
    downsize_pptx_images(**params)
  File "/home/chahu/.local/lib/python3.10/site-packages/pptx_downsizer/pptx_downsizer.py", line 147, in downsize_pptx_images
    img = Image.open(imgfn)
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 3008, in open
    raise UnidentifiedImageError(
PIL.UnidentifiedImageError: cannot identify image file '/tmp/tmpwp8xphkm/ppt/media/image16.svg'
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