mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 19:36:38 +03:00
If GIF has already seeked past first frame, it is animated
This commit is contained in:
parent
54be93c8b0
commit
73cf28cc94
|
@ -110,14 +110,16 @@ class GifImageFile(ImageFile.ImageFile):
|
||||||
self._is_animated = self._n_frames != 1
|
self._is_animated = self._n_frames != 1
|
||||||
else:
|
else:
|
||||||
current = self.tell()
|
current = self.tell()
|
||||||
|
if current:
|
||||||
try:
|
|
||||||
self.seek(1)
|
|
||||||
self._is_animated = True
|
self._is_animated = True
|
||||||
except EOFError:
|
else:
|
||||||
self._is_animated = False
|
try:
|
||||||
|
self.seek(1)
|
||||||
|
self._is_animated = True
|
||||||
|
except EOFError:
|
||||||
|
self._is_animated = False
|
||||||
|
|
||||||
self.seek(current)
|
self.seek(current)
|
||||||
return self._is_animated
|
return self._is_animated
|
||||||
|
|
||||||
def seek(self, frame):
|
def seek(self, frame):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user