-1

When we get an image from the ios album by default it always gets clipped.

Whereas if we use the UIImagePickerControllerOriginalImage, then it is too big.

(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    UIImage*temp =[info objectForKey:UIImagePickerControllerEditedImage];
}

Is there any good method to edit the Image without clipping it's range?

NREZ
  • 942
  • 9
  • 13
oday0311
  • 13
  • 3
  • 1
    get the original image and [resize](http://stackoverflow.com/questions/2658738/the-simplest-way-to-resize-an-uiimage) it yourself? – Matthias Bauch Jul 11 '13 at 10:12

1 Answers1

0

Maybe something like that...

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    UIImage*temp =[info objectForKey: UIImagePickerControllerOriginalImage];
    CGSize newSize = CGSizeMake("WIDTH", "HEIGHT");  <---- SET YOUR VALUES
    UIGraphicsBeginImageContext(newSize);
    [temp drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
    UIImage* smaller = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

}

Hardschool
  • 309
  • 2
  • 8