【发布时间】:2014-08-07 22:16:19
【问题描述】:
我是 XCode 的新手,我想从照片库中选择一张照片。
- (void) ChoosePhoto_from_Album
{
UIImagePickerController *imgage_picker = [[UIImagePickerController alloc] init];
imgage_picker.delegate = self;
imgage_picker.allowsEditing = YES;
imgage_picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:imgage_picker animated:YES completion:NULL];
}
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage * image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSLog(@"ImagePicker image size = (%.0f x %.0f)", image.size.width , image.size.height);
// process image...
}
我选择的照片是 5MP (2592x1936)。但是,它返回的大小是 960x716。 我错过了什么?
谢谢!
【问题讨论】:
-
设备(iPhone、iPad 等)上的图片在与 iTunes 同步时重新缩放。可能是你的情况......