diff --git a/YYImage/YYImageCoder.m b/YYImage/YYImageCoder.m index dbb8a2f..973a2b8 100644 --- a/YYImage/YYImageCoder.m +++ b/YYImage/YYImageCoder.m @@ -2457,13 +2457,13 @@ - (void)_encodeImageWithDestination:(CGImageDestinationRef)destination imageCoun } 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); } }