From 0c51b7967ed371d3e140d83449ae3910c5b1ea32 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 8 Jun 2015 01:01:50 +1000 Subject: [PATCH] Fixed seek bug in FliImagePlugin --- PIL/FliImagePlugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PIL/FliImagePlugin.py b/PIL/FliImagePlugin.py index 178623951..32cd05049 100644 --- a/PIL/FliImagePlugin.py +++ b/PIL/FliImagePlugin.py @@ -135,6 +135,7 @@ class FliImageFile(ImageFile.ImageFile): if frame == 0: self.__frame = -1 self.__fp.seek(self.__rewind) + self.__offset = 128 if frame != self.__frame + 1: raise ValueError("cannot seek to frame %d" % frame) @@ -153,7 +154,7 @@ class FliImageFile(ImageFile.ImageFile): self.decodermaxblock = framesize self.tile = [("fli", (0, 0)+self.size, self.__offset, None)] - self.__offset = self.__offset + framesize + self.__offset += framesize def tell(self):