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
74
74
---------
75
75
76
76
.. autodata :: PIL.ImageFile.LOAD_TRUNCATED_IMAGES
77
+ .. autodata :: PIL.ImageFile.MAXBLOCK
77
78
.. autodata :: PIL.ImageFile.ERRORS
78
79
:annotation:
Original file line number Diff line number Diff line change 46
46
logger = logging .getLogger (__name__ )
47
47
48
48
MAXBLOCK = 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
+ """
49
61
50
62
SAFEBLOCK = 1024 * 1024
51
63
You can’t perform that action at this time.
0 commit comments