Include reference to DecompressionBombError

This commit is contained in:
Andrew Murray 2020-07-21 21:46:31 +10:00
parent 265bfef36e
commit 5abf0eb4f3

View File

@ -57,6 +57,8 @@ Functions
turned into an error with ``warnings.simplefilter('error', Image.DecompressionBombWarning)`` or turned into an error with ``warnings.simplefilter('error', Image.DecompressionBombWarning)`` or
suppressed entirely with ``warnings.simplefilter('ignore', Image.DecompressionBombWarning)``. See suppressed entirely with ``warnings.simplefilter('ignore', Image.DecompressionBombWarning)``. See
also `the logging documentation`_ to have warnings output to the logging facility instead of stderr. also `the logging documentation`_ to have warnings output to the logging facility instead of stderr.
If the number of pixels is greater than twice :py:data:`PIL.Image.MAX_IMAGE_PIXELS`, then a
``DecompressionBombError`` will be raised instead.
.. _decompression bombs: https://en.wikipedia.org/wiki/Zip_bomb .. _decompression bombs: https://en.wikipedia.org/wiki/Zip_bomb
.. _the logging documentation: https://docs.python.org/3/library/logging.html#integration-with-the-warnings-module .. _the logging documentation: https://docs.python.org/3/library/logging.html#integration-with-the-warnings-module