views:

133

answers:

1

This is a very beginner problem. I'm trying to display an image taken with the camera, but when I display the image in a UIImageView the image is blown up. For instance, if I take a picture of a persons face, when I display the image, it will be blown up so much that it's pixelated and all I see is a portion of a nose (or whatever). What am I missing? thanks in advance!

- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *) info {

    UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];

    imageView.image = image;

    [picker dismissModalViewControllerAnimated:YES];
}
+1  A: 

Try to set the content mode to "scale to fill".
May be done in the IB or in code like this:

imageView.contentMode = UIViewContentModeScaleToFill;
Michael Kessler