title: How to convert images of gif picture to NSData for iOS?
body: <p>In my iOS Application, I want to show a Gif image in my <code>tableViewCell</code>. Download this Gif image by <code>SDWebImage</code>, and use <code>FLAnimatedImageView</code> to show this image.</p>
  
  <p>But now I have a problem, <code>SDWebImage</code> return a images ，but the <code>FLAnimatedImageView</code> want a <code>NSData</code>. </p>
  
  <p>How to convert images of <code>gif</code> to <code>NSData</code>？</p>
  
  <p>Forgive my poor English.</p>
  
  <pre><code>[[SDWebImageManager sharedManager] downloadImageWithURL:url options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
              if (image.images.count &gt; 0)//gif
              {
                  // how to get the data
                  FLAnimatedImage *animatedImage = [FLAnimatedImage animatedImageWithGIFData:data];
                  _chatGIFImage.animatedImage = animatedImage1;
              }
  
          }];
  </code></pre>