Optimize when scale = 1
This commit is contained in:
parent
6c6d848cee
commit
042c27ec8c
|
@ -56,10 +56,12 @@ inline UIImage *SDScaledImageForKey(NSString * _Nullable key, UIImage * _Nullabl
|
|||
scale = 3.0;
|
||||
}
|
||||
}
|
||||
|
||||
UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
|
||||
scaledImage.sd_imageFormat = image.sd_imageFormat;
|
||||
image = scaledImage;
|
||||
|
||||
if (scale != 1) {
|
||||
UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
|
||||
scaledImage.sd_imageFormat = image.sd_imageFormat;
|
||||
image = scaledImage;
|
||||
}
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue