From 7e50d78c8094ef5d319e5c17a88d765fb36b32d1 Mon Sep 17 00:00:00 2001 From: Pete Callaway Date: Thu, 14 Aug 2014 11:48:38 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20pass=20the=20original=20image?= =?UTF-8?q?=20data=20to=20be=20cached=20if=20the=20image=20has=20been=20tr?= =?UTF-8?q?ansformed=20as=20transparency=20may=20have=20been=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SDWebImage/SDWebImageManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index 4a94a7925..e8b1f6733 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -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(^{