Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt memory mapping when tile args is a string #7565

Merged
merged 1 commit into from Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/PIL/ImageFile.py
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
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