Skip to content

Commit

Permalink
code format...
Browse files Browse the repository at this point in the history
  • Loading branch information
ibireme committed Apr 21, 2016
1 parent f42422b commit bd71dca
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions YYImage/YYImageCoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit bd71dca

Please sign in to comment.