Fix crash condition + invalid image orientation (fix #206)
This commit is contained in:
parent
28f720ea32
commit
57f0700618
|
@ -63,9 +63,12 @@
|
|||
#endif
|
||||
|
||||
- (void)cancelCurrentImageLoad
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url
|
||||
{
|
||||
|
|
|
@ -83,7 +83,7 @@ NS_INLINE UIImage *SDScaledImageForPath(NSString *path, NSObject *imageOrData)
|
|||
}
|
||||
}
|
||||
|
||||
UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:UIImageOrientationUp];
|
||||
UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
|
||||
SDWISafeRelease(image)
|
||||
image = scaledImage;
|
||||
}
|
||||
|
|
|
@ -128,9 +128,12 @@
|
|||
|
||||
|
||||
- (void)cancelCurrentImageLoad
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url userInfo:(NSDictionary *)info
|
||||
{
|
||||
|
|
|
@ -63,9 +63,12 @@
|
|||
#endif
|
||||
|
||||
- (void)cancelCurrentImageLoad
|
||||
{
|
||||
@synchronized(self)
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue