File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -74,5 +74,6 @@ Constants
7474---------
7575
7676.. autodata :: PIL.ImageFile.LOAD_TRUNCATED_IMAGES
77+ .. autodata :: PIL.ImageFile.MAXBLOCK
7778.. autodata :: PIL.ImageFile.ERRORS
7879 :annotation:
Original file line number Diff line number Diff line change 4646logger = logging .getLogger (__name__ )
4747
4848MAXBLOCK = 65536
49+ """
50+ By default, Pillow processes image data in blocks. This helps to prevent excessive use
51+ of resources. Codecs may disable this behaviour with ``_pulls_fd`` or ``_pushes_fd``.
52+
53+ When reading an image, this is the number of bytes to read at once.
54+
55+ When writing an image, this is the number of bytes to write at once.
56+ If the image width times 4 is greater, then that will be used instead.
57+ Plugins may also set a greater number.
58+
59+ User code may set this to another number.
60+ """
4961
5062SAFEBLOCK = 1024 * 1024
5163
You can’t perform that action at this time.
0 commit comments