Page 1 of 1

Animated GIF that cannot be displayed properly

Posted: Sun Sep 13, 2015 6:45 am
by XnTriq
LCFactorization (Stack Overflow: [url=]Animated GIF that cannot be displayed properly by XnView or MS Internet Explorer[/url]) wrote:I created the following GIF by Mathematica, which can only be displayed properly by Chrome and FireFox.

Code: Select all

glist=Table[ParametricPlot3D[{Cos[b] (6-(5/4+Sin[3 a]) Sin[a+b h]),Sin[b] (6-(5/4+Sin[3 a]) Sin[a+b h]),-Cos[a+b h] (5/4+Sin[3 a])},{a,0,2 Pi},{b,0,2 Pi},PlotPoints->40,ColorFunction->(RGBColor[#,0,1-#,4/5]&[1/2+{1,-1}.{#1,#2}/2]&),Mesh->False,Boxed->False,Axes->False,Evaluated->True,ImageSize->300,PlotRangePadding->None],{h,0,6,1/3}];
Export["testAnimation.gif", Flatten@{glist, Reverse@glist}, 
 "DisplayDurations" -> 0.5]
In XnView, the animated GIF is static with only the first frame visible; while openning in Microsoft Internet Explorer, only first 3 frames are visible.


My questions are: why this happens (only properly displayed in some of the explorers) and how to avoid such issues when creating animated GIFs? Is it possible to amend the current GIF so that it is OK for all explorers?
The problem seems to be related to the local palettes of the frames.

Optimized with GIF Movie Gear (global palette):
  • Image