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

One large map won't optimize #11

Open
Guinfan72 opened this issue Mar 20, 2023 · 2 comments
Open

One large map won't optimize #11

Guinfan72 opened this issue Mar 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Guinfan72
Copy link

File is 14.6 MB, the rest of my maps were changed to .webp, though they were all under 9MB. The error message is:

root - ERROR - Traceback (most recent call last):
File "cli_wrapper\main.py", line 235, in main
File "cli_wrapper\main.py", line 229, in do_run
File "cli_wrapper\main.py", line 81, in perform_optimization_with
File "fvttoptimizer\optimizer.py", line 44, in optimize
File "fvttoptimizer__file_optimizer.py", line 34, in maybe_optimize
File "fvttoptimizer__file_optimizer.py", line 48, in __maybe_optimize2
File "fvttoptimizer__file_optimizer.py", line 53, in __optimize
File "fvttoptimizer__file_optimizer.py", line 74, in __encode_as_webp
File "PIL\Image.py", line 3109, in open
File "PIL\Image.py", line 3096, in _open_core
File "PIL\Image.py", line 3005, in _decompression_bomb_check
PIL.Image.DecompressionBombError: Image size (206308971 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.

An internal error occurred: Traceback (most recent call last):
File "cli_wrapper\main.py", line 235, in main
File "cli_wrapper\main.py", line 229, in do_run
File "cli_wrapper\main.py", line 81, in perform_optimization_with
File "fvttoptimizer\optimizer.py", line 44, in optimize
File "fvttoptimizer__file_optimizer.py", line 34, in maybe_optimize
File "fvttoptimizer__file_optimizer.py", line 48, in __maybe_optimize2
File "fvttoptimizer__file_optimizer.py", line 53, in __optimize
File "fvttoptimizer__file_optimizer.py", line 74, in __encode_as_webp
File "PIL\Image.py", line 3109, in open
File "PIL\Image.py", line 3096, in _open_core
File "PIL\Image.py", line 3005, in _decompression_bomb_check
PIL.Image.DecompressionBombError: Image size (206308971 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.

@Danny-Matelot
Copy link

Webp only allows up to 16,383 x 16,383 pixels.

So you must have a file larger than that, making fvvtoptimizer crash

@watermelonwolverine
Copy link
Owner

Yes, @Danny-Matelot, I also think that's the issue. Should there be a next version I will add a catch for this problem and put out a better error message so people without programming background will understand the issue.

@watermelonwolverine watermelonwolverine added the enhancement New feature or request label Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants