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

WebP error: partition 0 overflow (> 512K) / PIL.Image.DecompressionBombError #47

Open
audioscavenger opened this issue Jan 5, 2025 · 0 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@audioscavenger
Copy link
Owner

As reported here, delegate webp/cwebp libraries do NOT support WebP images larger then 12k*12k

Python PIL (9.5.0 as of today) relies on libwebp, and some quick testing reveals that you will NOT be able to save a WebP image larger then 12k. Tests below:

  • error when loading a 12k sample:
    python/lib/site-packages/PIL/Image.py:3176: DecompressionBombWarning: Image size (144000000 pixels) exceeds limit of 89478485 pixels, could be decompression bomb DOS attack.
  • error when loading a 14k sample:
python/lib/site-packages/PIL/Image.py", line 3173, in _decompression_bomb_check
    raise DecompressionBombError(msg)
PIL.Image.DecompressionBombError: Image size (196000000 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.
Image.py:3176: DecompressionBombWarning: Image size (144000000 pixels) exceeds limit of 89478485 pixels, could be decompression bomb DOS attack.

These errors happen when loading an image, we are not even at the save image part:
image

Therefore, no support will be provided for WebP images larger than 12k, as it is by design, from the Google developers.

@audioscavenger audioscavenger added the wontfix This will not be worked on label Jan 5, 2025
@audioscavenger audioscavenger self-assigned this Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant