mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 12:17:14 +03:00
Attempt memory mapping when tile args is a string
This commit is contained in:
parent
9694cfcfda
commit
a07bac3a56
|
@ -187,6 +187,8 @@ class ImageFile(Image.Image):
|
|||
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
|
||||
|
|
|
@ -168,6 +168,9 @@ class WebPImageFile(ImageFile.ImageFile):
|
|||
|
||||
return super().load()
|
||||
|
||||
def load_seek(self, pos):
|
||||
pass
|
||||
|
||||
def tell(self):
|
||||
if not _webp.HAVE_WEBPANIM:
|
||||
return super().tell()
|
||||
|
|
Loading…
Reference in New Issue
Block a user