From 43c12af7301a77c461f23df3a1dcda25857bea5c Mon Sep 17 00:00:00 2001 From: Kadir Can Ozden <101993364+bysiber@users.noreply.github.com> Date: Sat, 21 Feb 2026 15:23:38 +0300 Subject: [PATCH] Fix `self.decode` typo (#9445) Co-authored-by: Andrew Murray --- src/PIL/ImageFile.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PIL/ImageFile.py b/src/PIL/ImageFile.py index 341435437..50e0075a2 100644 --- a/src/PIL/ImageFile.py +++ b/src/PIL/ImageFile.py @@ -579,10 +579,7 @@ class Parser: pass # not enough data else: flag = hasattr(im, "load_seek") or hasattr(im, "load_read") - if flag or len(im.tile) != 1: - # custom load code, or multiple tiles - self.decode = None - else: + if not flag and len(im.tile) == 1: # initialize decoder im.load_prepare() d, e, o, a = im.tile[0]