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:
parent
873d9eddce
commit
c1d58106dc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue