|
@@ -191,16 +191,10 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week |
|
@@ -191,16 +191,10 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week |
191
|
|
191
|
|
192
|
dispatch_data_apply(dispatchedData, (dispatch_data_applier_t)^(dispatch_data_t region, size_t offset, const void *buffer, size_t size)
|
192
|
dispatch_data_apply(dispatchedData, (dispatch_data_applier_t)^(dispatch_data_t region, size_t offset, const void *buffer, size_t size)
|
193
|
{
|
193
|
{
|
194
|
- UIImage *diskImage = SDScaledImageForPath(key, [NSData dataWithBytes:buffer length:size]);
|
194
|
+ UIImage *diskImage = [UIImage decodedImageWithImage:SDScaledImageForPath(key, [NSData dataWithBytes:buffer length:size])];
|
195
|
|
195
|
|
196
|
- if (image)
|
|
|
197
|
- {
|
|
|
198
|
- UIImage *decodedImage = [UIImage decodedImageWithImage:diskImage];
|
|
|
199
|
- if (decodedImage)
|
196
|
+ if (diskImage)
|
200
|
{
|
197
|
{
|
201
|
- diskImage = decodedImage;
|
|
|
202
|
- }
|
|
|
203
|
-
|
|
|
204
|
[self.memCache setObject:diskImage forKey:key cost:image.size.height * image.size.width * image.scale];
|
198
|
[self.memCache setObject:diskImage forKey:key cost:image.size.height * image.size.width * image.scale];
|
205
|
}
|
199
|
}
|
206
|
|
200
|
|