Subject: bug#7799: 24.0.50; Animated images display strangely

From: Chong Yidong <[email-masked]>
Date: Sun, 14 Aug 2011 15:21:19 -0400

Lars Magne Ingebrigtsen <[email-masked]> writes:

> It's much better than it used to be, but I'm still seeing some glitches.
>
>  http://icanhascheezburger.files.wordpress.com/2011/08/0848b876-a808-4614-ac26-9285d46cc5f7.gif
>
> One single frame in the animation looks broken.  That seems to be the
> case with all my test cases where the image displays buggily.  (But
> most animated gifs display properly now.)  Could it be a off-by-one
> error of some kind?

Looks like there is off-spec behavior going on---not that the gif89a is
very descriptive in the first place.  The "buggy" frame is one which has
disposal method 2, defined in the gif89a spec as

 2 -   Restore to background color. The area used by the
       graphic must be restored to the background color.

And that's exactly what Emacs does, but it looks like web browsers are
rendering the background frame instead, under some circumstances.  I'll
take a look when I have the time.