Figured out my issue. I did called the check_animated function more than
once and the second call causes the exception unless I seek back to 0
On 6 May 2013 21:57, Sven wrote:
> Hello,
>
> I am trying to check if an image is animated. I can't rely on the
> extension as it may be a gif that's be
Hello,
I am trying to check if an image is animated. I can't rely on the extension
as it may be a gif that's been renamed to .jpg or something else and is
still animated.
I thought that this used to work:
from PIL import Image
def check_animated(img):
try:
img.seek(1)
except (E