Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

always use up orientation #70

Closed
wants to merge 1 commit into from

2 participants

@alecmontgomery

No description provided.

@jvanmetre

This was fixed in b108d07 by allowing the user to either use the full screen image, which is always in the up position, or the full resolution image, which needs the image orientation when creating the image.

@jvanmetre jvanmetre closed this
@raheelahmad raheelahmad deleted the monsoonco:AlwaysUseUpOrientation branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 9, 2014
  1. @alecmontgomery
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 Classes/ELCImagePicker/ELCImagePickerController.m
View
5 Classes/ELCImagePicker/ELCImagePickerController.m
@@ -46,11 +46,12 @@ - (void)selectedAssets:(NSArray *)assets
NSMutableDictionary *workingDictionary = [[NSMutableDictionary alloc] init];
[workingDictionary setObject:[asset valueForProperty:ALAssetPropertyType] forKey:@"UIImagePickerControllerMediaType"];
ALAssetRepresentation *assetRep = [asset defaultRepresentation];
-
+
+ // fullScreenImage is always rotated up
CGImageRef imgRef = [assetRep fullScreenImage];
UIImage *img = [UIImage imageWithCGImage:imgRef
scale:1.0f
- orientation:(UIImageOrientation)assetRep.orientation];
+ orientation:UIImageOrientationUp];
[workingDictionary setObject:img forKey:@"UIImagePickerControllerOriginalImage"];
[workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:@"UIImagePickerControllerReferenceURL"];
Something went wrong with that request. Please try again.