From 597ca79b1b01f446615323c67686dd205523ba96 Mon Sep 17 00:00:00 2001 From: chadawagner Date: Tue, 30 Jul 2019 11:28:44 -0700 Subject: [PATCH] rewind before decode, consistent with other cases --- src/PIL/TiffImagePlugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py index fb394af1649..bb86c53aa09 100644 --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -1175,6 +1175,7 @@ def _load_libtiff(self): # we have something else. if DEBUG: print("don't have fileno or getvalue. just reading") + self.fp.seek(0) # UNDONE -- so much for that buffer size thing. n, err = decoder.decode(self.fp.read())