mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-20 20:24:45 +03:00
Document MAXBLOCK
This commit is contained in:
parent
1435339290
commit
c826b932c0
|
@ -74,5 +74,6 @@ Constants
|
||||||
---------
|
---------
|
||||||
|
|
||||||
.. autodata:: PIL.ImageFile.LOAD_TRUNCATED_IMAGES
|
.. autodata:: PIL.ImageFile.LOAD_TRUNCATED_IMAGES
|
||||||
|
.. autodata:: PIL.ImageFile.MAXBLOCK
|
||||||
.. autodata:: PIL.ImageFile.ERRORS
|
.. autodata:: PIL.ImageFile.ERRORS
|
||||||
:annotation:
|
:annotation:
|
||||||
|
|
|
@ -46,6 +46,18 @@ if TYPE_CHECKING:
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
MAXBLOCK = 65536
|
MAXBLOCK = 65536
|
||||||
|
"""
|
||||||
|
By default, Pillow processes image data in blocks. This helps to prevent excessive use
|
||||||
|
of resources. Codecs may disable this behaviour with ``_pulls_fd`` or ``_pushes_fd``.
|
||||||
|
|
||||||
|
When reading an image, this is the number of bytes to read at once.
|
||||||
|
|
||||||
|
When writing an image, this is the number of bytes to write at once.
|
||||||
|
If the image width times 4 is greater, then that will be used instead.
|
||||||
|
Plugins may also set a greater number.
|
||||||
|
|
||||||
|
User code may set this to another number.
|
||||||
|
"""
|
||||||
|
|
||||||
SAFEBLOCK = 1024 * 1024
|
SAFEBLOCK = 1024 * 1024
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user