Fix crash condition + invalid image orientation (fix #206)

This commit is contained in:
Olivier Poitrey 2012-11-04 10:12:26 +01:00
parent 28f720ea32
commit 57f0700618
4 changed files with 13 additions and 4 deletions

View File

@ -64,7 +64,10 @@
- (void)cancelCurrentImageLoad
{
@synchronized(self)
{
[[SDWebImageManager sharedManager] cancelForDelegate:self];
}
}
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url

View File

@ -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;
}

View File

@ -129,7 +129,10 @@
- (void)cancelCurrentImageLoad
{
@synchronized(self)
{
[[SDWebImageManager sharedManager] cancelForDelegate:self];
}
}
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url userInfo:(NSDictionary *)info

View File

@ -64,7 +64,10 @@
- (void)cancelCurrentImageLoad
{
@synchronized(self)
{
[[SDWebImageManager sharedManager] cancelForDelegate:self];
}
}
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url