Fix memory cache image cost miscalculation for 4.x
This commit is contained in:
parent
88d3e281ca
commit
991fd89985
|
@ -18,7 +18,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
||||||
#if SD_MAC
|
#if SD_MAC
|
||||||
return image.size.height * image.size.width;
|
return image.size.height * image.size.width;
|
||||||
#elif SD_UIKIT || SD_WATCH
|
#elif SD_UIKIT || SD_WATCH
|
||||||
return image.size.height * image.size.width * image.scale * image.scale;
|
return image.size.height * image.size.width * image.scale * image.scale * CGImageGetBitsPerPixel(image.CGImage) / 8;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue