From 599465b62a3178b692b2ca40442318fec1e3143a Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 21 Nov 2023 22:23:49 +1100 Subject: [PATCH] Attempt memory mapping when tile args is a string --- src/PIL/ImageFile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PIL/ImageFile.py b/src/PIL/ImageFile.py index 902e8ce5ff6..998a68e1cea 100644 --- a/src/PIL/ImageFile.py +++ b/src/PIL/ImageFile.py @@ -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