Fix the hardcode to filter WebP for force decoding
This commit is contained in:
parent
c804ba7ea8
commit
f9fe2bb7b6
|
@ -419,19 +419,8 @@ didReceiveResponse:(NSURLResponse *)response
|
|||
NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL];
|
||||
image = [self scaledImageForKey:key image:image];
|
||||
|
||||
BOOL shouldDecode = YES;
|
||||
// Do not force decoding animated GIFs and WebPs
|
||||
if (image.images) {
|
||||
shouldDecode = NO;
|
||||
} else {
|
||||
#ifdef SD_WEBP
|
||||
SDImageFormat imageFormat = [NSData sd_imageFormatForImageData:imageData];
|
||||
if (imageFormat == SDImageFormatWebP) {
|
||||
shouldDecode = NO;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Do not force decoding animated images
|
||||
BOOL shouldDecode = !image.images;
|
||||
if (shouldDecode) {
|
||||
if (self.shouldDecompressImages) {
|
||||
BOOL shouldScaleDown = self.options & SDWebImageDownloaderScaleDownLargeImages;
|
||||
|
|
Loading…
Reference in New Issue