Skip to content

Commit 599465b

Browse files
committed
Attempt memory mapping when tile args is a string
1 parent 9694cfc commit 599465b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/PIL/ImageFile.py

+2
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ def load(self):
187187
if use_mmap:
188188
# try memory mapping
189189
decoder_name, extents, offset, args = self.tile[0]
190+
if isinstance(args, str):
191+
args = (args, 0, 1)
190192
if (
191193
decoder_name == "raw"
192194
and len(args) >= 3

0 commit comments

Comments
 (0)