From 66d294dbec3cc69d093b5c288c094804c0212a9b Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Wed, 3 Apr 2019 12:24:41 +0800 Subject: [PATCH] Fix tint image bug which leads to image upside down --- SDWebImage/UIImage+Transform.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/UIImage+Transform.m b/SDWebImage/UIImage+Transform.m index acf86fb1..85b1e271 100644 --- a/SDWebImage/UIImage+Transform.m +++ b/SDWebImage/UIImage+Transform.m @@ -349,7 +349,7 @@ static inline UIColor * SDGetColorFromPixel(Pixel_8888 pixel, CGBitmapInfo bitma SDGraphicsBeginImageContextWithOptions(size, NO, scale); CGContextRef context = SDGraphicsGetCurrentContext(); - CGContextDrawImage(context, rect, self.CGImage); + [self drawInRect:rect]; CGContextSetBlendMode(context, blendMode); CGContextSetFillColorWithColor(context, tintColor.CGColor); CGContextFillRect(context, rect);