0

Hi i am new to the iOS.

I wish to implement photo editing functionality in my app. that photo will be retrieve from iPhone photo library. I tried to place the photo in UIImageView. but i did not get better result. UIImageview does not show the photo as its being in photo album. there is lots of resolution and quality is missing.

If i want to show photo with original resolution and quality as its being in photo album. what are steps i need to follow. if any one knows please guide me right way.

    editingPhotoContainerIMV = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, self.view.frame.size.height)];
    [editingPhotoContainerIMV setContentMode:UIViewContentModeScaleAspectFit];
thavasidurai
  • 1,972
  • 1
  • 26
  • 51
  • If you just pick and add image to `UIImageView` then there's no reason if quality of image degrade. Are you sure you are not applying any image manipulation like resizing or any other stuff before you add image to `UIImageView`? – rptwsthi Sep 06 '12 at 06:14
  • Yes. i did not apply any image manipulation. – thavasidurai Sep 06 '12 at 06:18

2 Answers2

0

Try ALAssetRepresentation fullResolutionImage

jayr parro
  • 286
  • 3
  • 18
0

If the problem is you are on a Retina device, when you load your UIImage, you should be using:

UIImage *photoImage = [UIImage imageWithCGImage:(CGImageRef)imageRef scale:2 orientation: UIImageOrientationUp];

EDIT: Assuming the problem IS with Retina devices, then you need to get a CGImageRef. If you already have the UIImage, then you can replace 'imageRef' above with 'myUIimage.CGImage'. If not, if he image is in a file, then you can use UIImage's initWithContentsOfFile - look at the UIImage class reference. The key is to get the CGImage out of the UIImage, then get a new image with a scale factor of 2. The only way iOS lets you do that is with the method I showed up top.

David H
  • 40,852
  • 12
  • 92
  • 138