UIImagePickerController editing allowed locks UIImage to max size of 320x320

前端 未结 6 1205
无人及你
无人及你 2021-01-30 12:01

Update:

With iPhone OS 3.0+, the whole UIImagePickerController API has changed. This question and answer should be considered 2.2. legacy code.


When using

6条回答
  •  不思量自难忘°
    2021-01-30 12:34

    I wrote a category on UIImage that provides a full-resolution crop. The easiest way to install is with CocoaPods, by adding UIImage-ImagePickerCrop to your podfile.

    #import 
    
    ...
    
    - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info {
        [self dismissViewControllerAnimated:YES completion:nil];
    
        UIImage *croppedImage = [UIImage croppedImageWithImagePickerInfo:info];
        ...
    }
    

提交回复
热议问题