From c1d58106dc65ace7cbe52c56c4e161f49d24cc55 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Fri, 26 Apr 2019 22:11:34 +0800 Subject: [PATCH] Fix one bug of the macOS API `SDScaledImageForKey`, which does not modify the bitmapImageRep's size when scale is not equal to 1 --- SDWebImage/SDWebImageDefine.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SDWebImage/SDWebImageDefine.m b/SDWebImage/SDWebImageDefine.m index d339020a..254d5aa5 100644 --- a/SDWebImage/SDWebImageDefine.m +++ b/SDWebImage/SDWebImageDefine.m @@ -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