开发者

Error that occurs in ios4.1 (*** ERROR: FigCreateCGImageFromJPEG returned -12905. Input (null) was 499992 bytes.)!

开发者 https://www.devze.com 2023-01-21 05:06 出处:网络
*** ERROR: FigCreateCGImageFromJPEG returned -12905. Input (null) was 499992 bytes. I get a error in ios4.1 whenever i use the UIImagePicker [ just after taking a snap]. My code is a simple
*** ERROR: FigCreateCGImageFromJPEG returned -12905. Input (null) was 499992 bytes.

I get a error in ios4.1 whenever i use the UIImagePicker [ just after taking a snap]. My code is a simple

UIImagePickerController *c = [[UIImagePickerController alloc] init];
c.delegate = self;
c.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:c animated:NO];
[c release];

Though the app. works fine, unusally it crashed one tim开发者_高级运维e in 100 trials!


May be it will be Help

 // u also import framework   "MobileCoreServices"

UIImagePickerController *c = [[UIImagePickerController alloc] init];
c.delegate = self;
c.sourceType = UIImagePickerControllerSourceTypeCamera;
 NSString *requiredMediaType;
     requiredMediaType = (NSString *)kUTTypeImage;
    imagePicker.mediaTypes = [NSArray arrayWithObject:requiredMediaType];
   [self presentModalViewController:c animated:NO];
 [ c release];
}




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

        NSString  *ItemMediaType = [info objectForKey:
                               UIImagePickerControllerMediaType];



    if ([ItemMediaType isEqualToString:(NSString *)kUTTypeImage] == YES){



    UIImage *theImage = nil;

    if (picker.allowsEditing == YES){
        theImage = [info objectForKey:UIImagePickerControllerEditedImage];
    } else {
        theImage = [info objectForKey:UIImagePickerControllerOriginalImage];
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消