alex.huo 7 anni fa
parent
commit
9f1b968ae7
1 ha cambiato i file con 1 aggiunte e 8 eliminazioni
  1. 1 8
      Sources/Image/GIFAnimatedImage.swift

+ 1 - 8
Sources/Image/GIFAnimatedImage.swift

@@ -88,14 +88,7 @@ class GIFAnimatedImage {
                 gifDuration = .infinity
                 gifDuration = .infinity
             } else {
             } else {
                 // Get current animated GIF frame duration
                 // Get current animated GIF frame duration
-                guard let properties = CGImageSourceCopyPropertiesAtIndex(imageSource, i, nil)
-                    as? [String: Any] else
-                {
-                    return nil
-                }
-                
-                let gifInfo = properties[kCGImagePropertyGIFDictionary as String] as? [String: Any]
-                gifDuration += GIFAnimatedImage.getFrameDuration(from: gifInfo)
+                gifDuration += GIFAnimatedImage.getFrameDuration(from: imageSource, at: i)
             }
             }
             images.append(KingfisherWrapper.image(cgImage: imageRef, scale: options.scale, refImage: nil))
             images.append(KingfisherWrapper.image(cgImage: imageRef, scale: options.scale, refImage: nil))
             if options.onlyFirstFrame { break }
             if options.onlyFirstFrame { break }