瀏覽代碼

bugfix: fail to encode animated GIF from data source. #44

ibireme 9 年之前
父節點
當前提交
dfe43e3e2b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      YYImage/YYImageCoder.m

+ 2 - 2
YYImage/YYImageCoder.m

@@ -2457,13 +2457,13 @@ CGImageRef YYCGImageCreateWithWebPData(CFDataRef webpData,
             } else if ([imageSrc isKindOfClass:[NSURL class]]) {
                 CGImageSourceRef source = CGImageSourceCreateWithURL((CFURLRef)imageSrc, NULL);
                 if (source) {
-                    CGImageDestinationAddImageFromSource(destination, source, i, (CFDictionaryRef)frameProperty);
+                    CGImageDestinationAddImageFromSource(destination, source, 0, (CFDictionaryRef)frameProperty);
                     CFRelease(source);
                 }
             } else if ([imageSrc isKindOfClass:[NSData class]]) {
                 CGImageSourceRef source = CGImageSourceCreateWithData((CFDataRef)imageSrc, NULL);
                 if (source) {
-                    CGImageDestinationAddImageFromSource(destination, source, i, (CFDictionaryRef)frameProperty);
+                    CGImageDestinationAddImageFromSource(destination, source, 0, (CFDictionaryRef)frameProperty);
                     CFRelease(source);
                 }
             }