@@ -68,9 +68,9 @@ - (void)setImageColor:(UIColor *)imageColor {
68
68
69
69
- (UIImage*)makeImage : (UIImage *)image withTint : (UIColor *)color {
70
70
UIImage *newImage = [image imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate];
71
- UIGraphicsBeginImageContextWithOptions (image.size , NO , newImage. scale );
71
+ UIGraphicsBeginImageContextWithOptions (image.size , NO , 0.0 );
72
72
[color set ];
73
- [newImage drawInRect: CGRectMake (0 , 0 , image .size.width, newImage.size.height)];
73
+ [newImage drawInRect: CGRectMake (0 , 0 , newImage .size.width, newImage.size.height)];
74
74
newImage = UIGraphicsGetImageFromCurrentImageContext ();
75
75
UIGraphicsEndImageContext ();
76
76
return newImage;
@@ -107,7 +107,7 @@ - (void)setSource:(FFFastImageSource *)source {
107
107
} {
108
108
self.hasSentOnLoadStart = NO ;
109
109
}
110
- UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL: _source.url]];
110
+ UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL: _source.url] scale: [[UIScreen mainScreen ] scale ] ];
111
111
[self setImage: image];
112
112
if (self.onFastImageProgress ) {
113
113
self.onFastImageProgress (@{
@@ -192,6 +192,13 @@ - (void)downloadImage:(FFFastImageSource *) source options:(SDWebImageOptions) o
192
192
weakSelf.onFastImageLoadEnd (@{});
193
193
}
194
194
} else {
195
+ CGFloat scale = [UIScreen mainScreen ].scale ;
196
+
197
+ if (scale > 1.0 ) {
198
+ image = [UIImage imageWithCGImage: [image CGImage ] scale: scale orientation: UIImageOrientationUp];
199
+ [weakSelf setImage: image];
200
+ }
201
+
195
202
weakSelf.hasCompleted = YES ;
196
203
[weakSelf sendOnLoad: image];
197
204
if (weakSelf.onFastImageLoadEnd ) {
0 commit comments