title: How can I get the number of frames per second from a gif file?
body: <p>I am trying to get the number of frames per second from a gif file.
  I am converting the gif file to NSData and then from that NSData I take an array of frames using this code:</p>
  <pre class="lang-objectivec prettyprint-override"><code>-(NSMutableArray *)getGifFrames:(NSData *)data{
      NSMutableArray *frames = nil;
      CGImageSourceRef src = CGImageSourceCreateWithData((CFDataRef)data, NULL);
      if (src) {
          size_t l = CGImageSourceGetCount(src);
          frames = [NSMutableArray arrayWithCapacity:l];
          for (size_t i = 0; i &lt; l; i++) {
              CGImageRef img = CGImageSourceCreateImageAtIndex(src, i, NULL);
              if (img) {
                  [frames addObject:[UIImage imageWithCGImage:img]];
                  CGImageRelease(img);
              }   
          }   
          CFRelease(src);
      } 
      return frames;
  }
  </code></pre>
  <p>Is there anyway I can get the FPS of the gif?</p>