1
使用iPhone 4時,使用後置攝像頭時出現內存問題。它導致內存錯誤,不會將圖片分配給UIView。這是代碼。後iPhone 4相機UIImageView質量過高?
-(IBAction)getCameraPicture:(id)sender {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = NO;
if(sender == takePictureButton)
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
else
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:picker animated:YES];
[picker release];
}
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info
{
imageView.image = [info objectForKey:UIImagePickerControllerOriginalImage];
[picker dismissModalViewControllerAnimated:YES];
}
它採用前置(低質量)相機時,如不加載現有圖片不完全質量採取的正常工作。有沒有辦法降低使用後置攝像頭拍攝的照片的質量,或者採取其他方式來解決此問題?