Last Comment Bug 208622 - Some animated GIF images don't display properly
: Some animated GIF images don't display properly
: fixed1.4.1
Product: Core
Classification: Components
Component: ImageLib (show other bugs)
: Trunk
: All All
: -- major (vote)
: ---
Assigned To: tor
: Terri Preston
: Milan Sreckovic [:milan]
: 212093 (view as bug list)
Depends on:
Blocks: 224532
  Show dependency treegraph
Reported: 2003-06-07 06:57 PDT by Jure Repinc (JLP)
Modified: 2003-11-03 01:47 PST (History)
7 users (show)
mozilla: blocking1.4.1+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Anim-GIF that renders incorrectly on Mozilla 1.4 (6.10 KB, image/gif)
2003-07-09 18:50 PDT, Michael Sinz
no flags Details
move limit check to HaveDecodedRow (3.99 KB, patch)
2003-07-22 12:43 PDT, tor
pavlov: review+
scc: superreview+
mozilla: approval1.4.1+
Details | Diff | Splinter Review

Description Jure Repinc (JLP) 2003-06-07 06:57:15 PDT
If you go to the above URL you can see 4 blue squares under Contents. These
animated GIF images ( should
display as question marks in a speach bubble just like on this image:

I'm using Mozilla 2003060608 on Windows XP Pro with SP1.
Comment 1 Olivier Cahagne 2003-06-07 09:47:10 PDT

*** This bug has been marked as a duplicate of 206709 ***
Comment 2 Olivier Cahagne 2003-06-07 09:47:33 PDT
sorry about that, wrong bug.
Comment 3 Jason Barnabe (np) 2003-06-07 10:09:44 PDT
Confirming on WinXP 2003060608.
Comment 4 Jure Repinc (JLP) 2003-06-14 15:25:12 PDT
The same problem also exists on Linux (Mandrake 9.1 and nightly 20030611).
Comment 5 Jure Repinc (JLP) 2003-07-03 11:43:27 PDT
This bug is now also part of Mozilla 1.4 final.
Comment 6 Michael Sinz 2003-07-09 18:43:04 PDT
I can confirm that this is happening on certain types of Anim GIFs with Mozilla
1.4 on Mac OS-X, Linux, and Windows.  (Win2K and WinXP)

For an example, go to and look at the
Pente0.gif that is rendered incorrectly. to load it directly...

This is not the case on 1.3 and 1.3.1 nor other older offshoots.
Comment 7 Michael Sinz 2003-07-09 18:50:08 PDT
Created attachment 127403 [details]
Anim-GIF that renders incorrectly on Mozilla 1.4

Here is my Anim-GIF that renders incorrectly.  The problem is most likely
caused by the use of some advanced GIF sub-area features in the multi-frame GIF
images.  This used to work.  I am sorry I did not notice this before but I did
not have a need to look at my Palm web page for quite some time and today I
just happened to need to do so and noticed the problem.

I have tried older builds that I had still on my system (I don't have a very
fast net connection, so downloading others is currently out of the question)
but I noticed this in the Mozilla 1.4 final and Mozilla 1.4b release for Linux
x86, Mac OS-X, and Windows (2K and XP).  I have verified that it did not happen
in Mozilla 1.3.1 on any of those platforms.
Comment 8 tor 2003-07-22 12:21:38 PDT
For the testcase image this is caused by the checkin for bug 199701, which
was supposed to guard against illegal color index values.  Unfortunately
this file has a colormap of two entries, but is using an index value of
two (what would be the third entry) as the transparent index.

Taking bug.
Comment 9 tor 2003-07-22 12:43:21 PDT
Created attachment 128270 [details] [diff] [review]
move limit check to HaveDecodedRow

Patch backs out the old limit check and moves it to HaveDecodedRow.
Additionally folds the RGB and BGR cases to reduce code size.
Comment 10 Randell Jesup [:jesup] 2003-07-23 07:30:06 PDT
Comment on attachment 128270 [details] [diff] [review]
move limit check to HaveDecodedRow


Is format == gfxIFormats::BGR the only possibility for
XP_WIN/XP_OS2/XP_BEOS/PHOTON?  Those can never be using ::RGB?	If so, does
gfxIFormats really need to have RGB and BGR as separate values?

Is that list of OS's really shorthand for something else (some HW attribute)? 
If so, should we use that list in one spot to set a GFX_HW_IS_BGR or whatever
define instead?

BTW, I've hacked on some of this code before; looks good to me too.
Comment 11 tor 2003-07-23 07:37:36 PDT
In theory imglib2 should be querying gfx to inquire what format it would
like the images in, but in practice all the decoders hardcode this knowledge.
Changing that would be the subject of another bug.
Comment 12 tor 2003-07-24 17:10:46 PDT
Checked in.
Comment 13 tor 2003-08-05 13:45:49 PDT
*** Bug 212093 has been marked as a duplicate of this bug. ***
Comment 14 Mike Kaply [:mkaply] 2003-08-05 15:25:50 PDT
Comment on attachment 128270 [details] [diff] [review]
move limit check to HaveDecodedRow

Comment 15 Mike Kaply [:mkaply] 2003-08-05 15:26:24 PDT
Please add fixed1.4.1 keyword when checked in.
Comment 16 Randell Jesup [:jesup] 2003-08-11 12:27:38 PDT
Is this being fixed in 1.5 as well?
Comment 17 Randell Jesup [:jesup] 2003-08-11 12:32:21 PDT
tor tells me it's checked into trunk and 1.4 branch, so no issue there.

Note You need to log in before you can comment on or make changes to this bug.