title: XNA Gif Animation
body: <p>I'm editing 
  XNA Gif Animation Library
  because it doesn't work properly
  it loads gif file but with wrong colors</p>
  
  <p>here its import code</p>
  
  <pre><code>public override GifAnimationContent Import(string filename, ContentImporterContext context)
      {
          GifAnimationContent content = new GifAnimationContent();
          Image source = Image.FromFile(filename);
          FrameDimension dimension = new FrameDimension(source.FrameDimensionsList[0]);
          int frameCount = source.GetFrameCount(dimension);
          content.Frames = new TextureData[frameCount];
          for (int i = 0; i &lt; frameCount; i++)
          {
              source.SelectActiveFrame(dimension, i);
              byte[] buffer = Quantizer.Quantize(source);
              content.Frames[i].__1__SurfaceFormat = SurfaceFormat.Color;
              content.Frames[i].__2__Width = source.Width;
              content.Frames[i].__3__Height = source.Height;
              content.Frames[i].__4__Levels = 1;
              content.Frames[i].Data = buffer;
          }
          source.Dispose();
          return content;
      }
  </code></pre>
  
  <p>I think that problem is SurfaceFormat.Color because Gif files doesn't support anything else
  except indexed palette
  but I can't figure out what SurfaceFormat will be correct or what kind of file convertions should be done on gif image to work properly</p>
  
  <p>Please help</p>
  
  <p>Thanks.</p>