Take images into account
This commit is contained in:
parent
991fd89985
commit
504dc10491
|
@ -18,7 +18,8 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||
#if SD_MAC
|
||||
return image.size.height * image.size.width;
|
||||
#elif SD_UIKIT || SD_WATCH
|
||||
return image.size.height * image.size.width * image.scale * image.scale * CGImageGetBitsPerPixel(image.CGImage) / 8;
|
||||
NSUInteger imageSize = image.size.height * image.size.width * image.scale * image.scale * CGImageGetBitsPerPixel(image.CGImage) / 8;
|
||||
return image.images ? (imageSize * image.images.count) : imageSize;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue