Permalink
Browse files

Make sure images cached on disk are grayscale when using SDWebImageDo…

…wnloaderGrayscale
  • Loading branch information...
1 parent c389f7a commit c8a84eb00cbf8de20ca2743704dea0814b8c642b @NachoSoto NachoSoto committed Jan 29, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 SDWebImage/SDWebImageDownloaderOperation.m
@@ -281,6 +281,9 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)aConnection
if (self.options & SDWebImageDownloaderGrayscale)
{
image = [image grayscaleImage];
+ // invalidate downloaded data so that it's generated again with the grayscale version
+ // this is to make sure that's the version that gets cached
+ self.imageData = nil;
}
dispatch_async(dispatch_get_main_queue(), ^

0 comments on commit c8a84eb

Please sign in to comment.