Generally, you can use imagepickercontroller to obtain the DIC.
Uiimage * image = [DIC objectforkey: @ "uiimagepickercontrolleroriginalimage"];
To obtain the source image, but I used this method to obtain the image not the source image, but the size after compression. Then I found a new method to obtain the source image and paste the Code directly.
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; [library assetForURL:[dic objectForKey:UIImagePickerControllerReferenceURL] resultBlock:^(ALAsset *asset) { ALAssetRepresentation *representation = [asset defaultRepresentation]; CGImageRef imgRef = [representation fullResolutionImage]; UIImage *image = [UIImage imageWithCGImage:imgRef scale:representation.scale orientation:(UIImageOrientation)representation.orientation]; NSData * data = UIImageJPEGRepresentation(image, 0.5); }failureBlock:^(NSError *error){ NSLog(@"couldn‘t get asset: %@", error); } ];