我從UIImagePickerController
獲取編輯後的圖像。在視網膜iOS設備上,返回的圖像是640x640,但在非視網膜iOS設備上,返回的圖像僅爲320x320。在非視網膜設備上從UIImagePickerController獲取640x640 UIImage
如何從非視網膜設備上的控制器獲得640x640而無需手動升級?因爲我正在上傳,所以無論屏幕如何,我都需要這些尺寸保持不變。
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *image = info[UIImagePickerControllerEditedImage];
//image.size is 320x320 points on both retina and non-retina devices.
//How do I get 640x640 *pixels* for non-retina devices without upscaling?
}
你怎麼樣表現出一定的代碼? –