Skip to content

Commit

Permalink
Attempt memory mapping when tile args is a string
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 21, 2023
1 parent 9694cfc commit 599465b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PIL/ImageFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def load(self):
if use_mmap:
# try memory mapping
decoder_name, extents, offset, args = self.tile[0]
if isinstance(args, str):
args = (args, 0, 1)
if (
decoder_name == "raw"
and len(args) >= 3
Expand Down

0 comments on commit 599465b

Please sign in to comment.