Re: PIL: check if image is animated

2013-05-09 Thread Sven
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

PIL: check if image is animated

2013-05-06 Thread Sven
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