Fix loop detection in animated GIFS

Issue #7 resolved
Valentino Volonghi
created an issue

Currently the GIFImagePlugin hardcodes info['loop'] = 1 when it detects GIF extensions. The fix for this is rather simple.

Here is the specification for the field:
http://www.let.rug.nl/~kleiweg/gif/netscape.html

And here is the bit of code that should go instead of the hardcoding:

{{{
block = self.data()
block = block[1:] # discard byte \x01
self.info['loop'] = struct.unpack('h', block)[0]
}}}

Comments (1)

  1. Log in to comment