Skip to content

Commit

Permalink
Don’t pass the original image data to be cached if the image has been…
Browse files Browse the repository at this point in the history
… transformed as transparency may have been added
  • Loading branch information
PeteC authored and archfear committed Apr 3, 2015
1 parent 704c630 commit 7e50d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SDWebImage/SDWebImageManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ - (void)diskImageExistsForURL:(NSURL *)url

if (transformedImage && finished) {
BOOL imageWasTransformed = ![transformedImage isEqual:downloadedImage];
[self.imageCache storeImage:transformedImage recalculateFromImage:imageWasTransformed imageData:data forKey:key toDisk:cacheOnDisk];
[self.imageCache storeImage:transformedImage recalculateFromImage:imageWasTransformed imageData:imageWasTransformed ? nil : data forKey:key toDisk:cacheOnDisk];
}

dispatch_main_sync_safe(^{
Expand Down

0 comments on commit 7e50d78

Please sign in to comment.