diff --git a/PIL/ImageFile.py b/PIL/ImageFile.py index 82691af92..79faff797 100644 --- a/PIL/ImageFile.py +++ b/PIL/ImageFile.py @@ -196,6 +196,9 @@ class ImageFile(Image.Image): except AttributeError: prefix = b"" + # Buffer length read; assign a default value + t = 0 + for d, e, o, a in self.tile: d = Image._getdecoder(self.mode, d, a, self.decoderconfig) seek(o)