Fix sd_animatedImageByScalingAndCroppingToSize:
This commit is contained in:
parent
5a5c65d799
commit
46c59183aa
|
@ -141,17 +141,17 @@
|
|||
|
||||
NSMutableArray *scaledImages = [NSMutableArray array];
|
||||
|
||||
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
|
||||
|
||||
for (UIImage *image in self.images) {
|
||||
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
|
||||
|
||||
[image drawInRect:CGRectMake(thumbnailPoint.x, thumbnailPoint.y, scaledSize.width, scaledSize.height)];
|
||||
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
|
||||
[scaledImages addObject:newImage];
|
||||
|
||||
UIGraphicsEndImageContext();
|
||||
}
|
||||
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
|
||||
return [UIImage animatedImageWithImages:scaledImages duration:self.duration];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue