python-pillow/Pillow — pull request #993 by moriyoshi (2014-11-06 12:37:51+00:00)
Title: The optimization algorithm is only applicable to the image of mode="P" or "L".

(This issue was previously addressed in #991 )

The optimization algorithm used in getheader() assumes the image data is 8bpp and therefore it cannot be applied to the bi-level'ed image which is also supported by the GIF plugin. It is of course possible to support optimization for such images, but it would need a specific hack around the unpacker and I don't think it is appropriate.