|
|
@@ -262,7 +262,7 @@ static NSString * _defaultDiskCacheDirectory;
|
|
|
SDImageFormat format = image.sd_imageFormat;
|
|
|
if (format == SDImageFormatUndefined) {
|
|
|
// If image is animated, use GIF (APNG may be better, but has bugs before macOS 10.14)
|
|
|
- if (image.sd_isAnimated) {
|
|
|
+ if (image.sd_imageFrameCount > 1) {
|
|
|
format = SDImageFormatGIF;
|
|
|
} else {
|
|
|
// If we do not have any data to detect image format, check whether it contains alpha channel to use PNG or JPEG format
|
|
|
@@ -461,7 +461,7 @@ static NSString * _defaultDiskCacheDirectory;
|
|
|
if (image) {
|
|
|
if (options & SDImageCacheDecodeFirstFrameOnly) {
|
|
|
// Ensure static image
|
|
|
- if (image.sd_isAnimated) {
|
|
|
+ if (image.sd_imageFrameCount > 1) {
|
|
|
#if SD_MAC
|
|
|
image = [[NSImage alloc] initWithCGImage:image.CGImage scale:image.scale orientation:kCGImagePropertyOrientationUp];
|
|
|
#else
|
|
|
@@ -593,7 +593,7 @@ static NSString * _defaultDiskCacheDirectory;
|
|
|
if (image) {
|
|
|
if (options & SDImageCacheDecodeFirstFrameOnly) {
|
|
|
// Ensure static image
|
|
|
- if (image.sd_isAnimated) {
|
|
|
+ if (image.sd_imageFrameCount > 1) {
|
|
|
#if SD_MAC
|
|
|
image = [[NSImage alloc] initWithCGImage:image.CGImage scale:image.scale orientation:kCGImagePropertyOrientationUp];
|
|
|
#else
|