iOS 4:FigCreateCGImageFromJPEG返回-1

我试图让我的应用程序运行一个基本的图像select器/照片接受器,并遇到以下错误:

*** ERROR: FigCreateCGImageFromJPEG returned -1. Input (null) was 551120 bytes 

我有图像select器显示,相机视图工作正常。

当我用相机拍摄图像并select“使用”button时,错误出现在控制台中,应用程序崩溃。

该应用程序工作正常,只是为了从相册中select一个图像。 我在这里看过类似的线程 ,似乎没有提出解决scheme。

只是想知道是否有人遇到任何有用的东西。

 -(IBAction)getPhoto:(id)sender{ if((UIButton *) sender == sharePhoto) { imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; } else { imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; } [self presentModalViewController:imagePicker animated:YES]; } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker dismissModalViewControllerAnimated:YES]; imageView.image = [info objectForKey:@""]; } 

我设法阻止我的应用程序崩溃,但错误仍然存​​在。

而不是直接从我的UIImageView NSDictionary *info分配UIImage我保留在一个UIImagevariables,然后closuresModalViewcontroller

在根UIViewControllerviewWillAppear方法中,然后将图像分配给我的UIImageView .image。

我不知道我做的事情是否是事情的根源。 错误仍然出现在控制台中。