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 a07bac3
Show file tree
Hide file tree
Showing 2 changed files with 5 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
3 changes: 3 additions & 0 deletions src/PIL/WebPImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def load(self):

return super().load()

def load_seek(self, pos):
pass

def tell(self):
if not _webp.HAVE_WEBPANIM:
return super().tell()
Expand Down

0 comments on commit a07bac3

Please sign in to comment.