From 48a7b7f943a9a267eb58857fac88837db735ef38 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sun, 15 Dec 2019 19:49:41 +0800 Subject: [PATCH] Fix the issues during refactory, the UIGraphicsRenderer using the point size, not pixel size --- SDWebImage/Core/UIImage+Transform.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDWebImage/Core/UIImage+Transform.m b/SDWebImage/Core/UIImage+Transform.m index 45cd7fba..db5de997 100644 --- a/SDWebImage/Core/UIImage+Transform.m +++ b/SDWebImage/Core/UIImage+Transform.m @@ -257,8 +257,8 @@ static inline UIColor * SDGetColorFromPixel(Pixel_8888 pixel, CGBitmapInfo bitma - (nullable UIImage *)sd_rotatedImageWithAngle:(CGFloat)angle fitSize:(BOOL)fitSize { if (!self.CGImage) return nil; - size_t width = (size_t)CGImageGetWidth(self.CGImage); - size_t height = (size_t)CGImageGetHeight(self.CGImage); + size_t width = self.size.width; + size_t height = self.size.height; CGRect newRect = CGRectApplyAffineTransform(CGRectMake(0, 0, width, height), fitSize ? CGAffineTransformMakeRotation(angle) : CGAffineTransformIdentity);