Skip to content

Commit

Permalink
[Issue #110] Fixing orientation issues by using UIImage imageOrientat…
Browse files Browse the repository at this point in the history
…ion value rather than assuming UIImageOrientationUp
  • Loading branch information
mattt committed Nov 21, 2011
1 parent c466a24 commit 0e93cf0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AFNetworking/AFImageRequestOperation.m
Expand Up @@ -158,8 +158,9 @@ - (void)dealloc {
#if __IPHONE_OS_VERSION_MIN_REQUIRED
- (UIImage *)responseImage {
if (!_responseImage && [self isFinished]) {
CGImageRef imageRef = [[UIImage imageWithData:self.responseData] CGImage];
self.responseImage = [UIImage imageWithCGImage:imageRef scale:self.imageScale orientation:UIImageOrientationUp];
UIImage *image = [UIImage imageWithData:self.responseData];

self.responseImage = [UIImage imageWithCGImage:[image CGImage] scale:self.imageScale orientation:image.imageOrientation];
}

return _responseImage;
Expand Down

0 comments on commit 0e93cf0

Please sign in to comment.