UIImagePickerController bug

前端 未结 4 1005
庸人自扰
庸人自扰 2020-12-25 12:09

I think I found a bug in latest iOS 7 by running an app with Base SDK set to iOS 6.1 (possibly even lower versions too, haven\'t tested that out yet)

I have this ima

4条回答
  •  感情败类
    2020-12-25 13:02

    I'm trying to reproduce this bug. And have no luck on simulator, simulator 64-bit and iPad mini. All running iOS 7.0.

    I put your code in my app:

    UIImage *image = [info valueForKey:UIImagePickerControllerEditedImage];
    if (!image)
        image = [info valueForKey:UIImagePickerControllerOriginalImage];
    
    // Save photo to custom album only if taken by camera
    if (picker.sourceType == UIImagePickerControllerSourceTypeCamera)
        [ALAssetsLibrary saveImageToCustomAlbum:image
                                       assetURL:[info valueForKey:UIImagePickerControllerReferenceURL]];
    
    
    NSData *d = UIImagePNGRepresentation(image);
    [d writeToFile:@"/Volumes/Alko/Temp/test.png" atomically:YES];
    
    UIImageWriteToSavedPhotosAlbum(image, nil, NULL, nil);
    
    [self setImage:image];
    [self dismissPicker:picker];
    [self photoPickerDidFinish];
    

    And it works correct using image downloaded from http://i.imgur.com/7KUIGLt.jpg. I think you have issue in your app, not in UIImagePickerController.

提交回复
热议问题