Fix one bug of the macOS API `SDScaledImageForKey`, which does not modify the bitmapImageRep's size when scale is not equal to 1

This commit is contained in:
DreamPiggy 2019-04-26 22:11:34 +08:00
parent 873d9eddce
commit c1d58106dc
1 changed files with 1 additions and 0 deletions

View File

@ -98,6 +98,7 @@ inline UIImage * _Nullable SDScaledImageForScaleFactor(CGFloat scale, UIImage *
if (bitmapImageRep) {
NSSize size = NSMakeSize(image.size.width / scale, image.size.height / scale);
animatedImage = [[NSImage alloc] initWithSize:size];
bitmapImageRep.size = size;
[animatedImage addRepresentation:bitmapImageRep];
}
#endif