From bd71dcac5da64a1a3fbcd27f927661140e0d4fa7 Mon Sep 17 00:00:00 2001 From: ibireme Date: Fri, 22 Apr 2016 00:35:28 +0800 Subject: [PATCH] code format... --- YYImage/YYImageCoder.m | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/YYImage/YYImageCoder.m b/YYImage/YYImageCoder.m index 56c5608..a6d8424 100644 --- a/YYImage/YYImageCoder.m +++ b/YYImage/YYImageCoder.m @@ -1973,19 +1973,19 @@ - (void)_updateSourceImageIO { if (_type == YYImageTypePNG) { // use custom apng decoder and ignore multi-frame _frameCount = 1; } - if (_type == YYImageTypeGIF) { // get gif loop count - CFDictionaryRef properties = CGImageSourceCopyProperties(_source, NULL); - if (properties) { - CFDictionaryRef gif = CFDictionaryGetValue(properties, kCGImagePropertyGIFDictionary); - if (gif) { - CFTypeRef loop = CFDictionaryGetValue(gif, kCGImagePropertyGIFLoopCount); - if (loop) CFNumberGetValue(loop, kCFNumberNSIntegerType, &_loopCount); - } - CFRelease(properties); + if (_type == YYImageTypeGIF) { // get gif loop count + CFDictionaryRef properties = CGImageSourceCopyProperties(_source, NULL); + if (properties) { + CFDictionaryRef gif = CFDictionaryGetValue(properties, kCGImagePropertyGIFDictionary); + if (gif) { + CFTypeRef loop = CFDictionaryGetValue(gif, kCGImagePropertyGIFLoopCount); + if (loop) CFNumberGetValue(loop, kCFNumberNSIntegerType, &_loopCount); + } + CFRelease(properties); + } } - } } - + /* ICO, GIF, APNG may contains multi-frame. */