[error] exceeds limit of 178956970 pixels,能否扩大图片像素的限制呢,比如10亿像素。
Closed this issue · 2 comments
Benson1997 commented
Error log:
H:\Demo 4\prod 2023-06-09_110249_013.jpg -> C:\Users\Ben\AppData\Local\Temp\4sPOtTeMKgVhIfFp.jpg done
Traceback (most recent call last):
File "task.py", line 244, in taskRunner
File "task.py", line 105, in run
File "PIL\Image.py", line 3268, in open
File "PIL\Image.py", line 3255, in _open_core
File "PIL\Image.py", line 3164, in _decompression_bomb_check
PIL.Image.DecompressionBombError: Image size (398253024 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.
Thank you very much!
For some scanned photos, it is easy to exceed the limit after enlarging. Can the pixel limit of the image be expanded, such as to 1 billion pixels?
对于一些扫描的照片,放大之后很容易超出限制,能否扩大图片像素的限制呢,比如10亿像素。
TransparentLC commented
这个检测是 Pillow 自带的,本来的目的是检测类似于 ZIP bomb 的解码后会大量占用内存的图片。我已经禁用了这个检测,可以去 Actions 下载最新的主程序替换掉然后再试一下。
Benson1997 commented
好的,工作太忙了,才看到消息,感谢T大,(∩_∩)