Permalink
Browse files

merged pull request #17 from thedarkbark

  • Loading branch information...
1 parent 20cd265 commit f6e83d1a5dd50e9cf881eb1aa396e6681cfc832f @OpenFibers committed Jun 21, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 Classes/ELCImagePicker/ELCImagePickerController.m
@@ -30,7 +30,12 @@ -(void)selectedAssets:(NSArray*)_assets {
NSMutableDictionary *workingDictionary = [[NSMutableDictionary alloc] init];
[workingDictionary setObject:[asset valueForProperty:ALAssetPropertyType] forKey:@"UIImagePickerControllerMediaType"];
- [workingDictionary setObject:[UIImage imageWithCGImage:[[asset defaultRepresentation] fullScreenImage]] forKey:@"UIImagePickerControllerOriginalImage"];
+ ALAssetRepresentation *assetRep = [asset defaultRepresentation];
+ CGImageRef imgRef = [assetRep fullScreenImage];
+ UIImage *img = [UIImage imageWithCGImage:imgRef
+ scale:assetRep.scale
+ orientation:(UIImageOrientation)assetRep.orientation];
+ [workingDictionary setObject:img forKey:@"UIImagePickerControllerOriginalImage"];
[workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:@"UIImagePickerControllerReferenceURL"];
[returnArray addObject:workingDictionary];

0 comments on commit f6e83d1

Please sign in to comment.