Fixed issue #529 - if the `cacheKeyFilter` was set, this was ignored when computing the `scaledImageForKey`. For most of the developers that did not set `cacheKeyFilter`, the code will work exactly the same
This commit is contained in:
parent
a8a69ab9b6
commit
eb91fdd3b8
|
@ -10,6 +10,7 @@
|
||||||
#import "SDWebImageDecoder.h"
|
#import "SDWebImageDecoder.h"
|
||||||
#import "UIImage+MultiFormat.h"
|
#import "UIImage+MultiFormat.h"
|
||||||
#import <ImageIO/ImageIO.h>
|
#import <ImageIO/ImageIO.h>
|
||||||
|
#import "SDWebImageManager.h"
|
||||||
|
|
||||||
@interface SDWebImageDownloaderOperation () {
|
@interface SDWebImageDownloaderOperation () {
|
||||||
BOOL _executing;
|
BOOL _executing;
|
||||||
|
@ -285,7 +286,8 @@
|
||||||
|
|
||||||
if (partialImageRef) {
|
if (partialImageRef) {
|
||||||
UIImage *image = [UIImage imageWithCGImage:partialImageRef scale:1 orientation:orientation];
|
UIImage *image = [UIImage imageWithCGImage:partialImageRef scale:1 orientation:orientation];
|
||||||
UIImage *scaledImage = [self scaledImageForKey:self.request.URL.absoluteString image:image];
|
NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL];
|
||||||
|
UIImage *scaledImage = [self scaledImageForKey:key image:image];
|
||||||
image = [UIImage decodedImageWithImage:scaledImage];
|
image = [UIImage decodedImageWithImage:scaledImage];
|
||||||
CGImageRelease(partialImageRef);
|
CGImageRelease(partialImageRef);
|
||||||
dispatch_main_sync_safe(^{
|
dispatch_main_sync_safe(^{
|
||||||
|
@ -353,7 +355,8 @@
|
||||||
|
|
||||||
UIImage *image = [UIImage sd_imageWithData:self.imageData];
|
UIImage *image = [UIImage sd_imageWithData:self.imageData];
|
||||||
|
|
||||||
image = [self scaledImageForKey:self.request.URL.absoluteString image:image];
|
NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL];
|
||||||
|
image = [self scaledImageForKey:key image:image];
|
||||||
|
|
||||||
if (!image.images) // Do not force decod animated GIFs
|
if (!image.images) // Do not force decod animated GIFs
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue