开发者

The width/height rate of the photos from UIImagePickerController on iPhone

开发者 https://www.devze.com 2023-01-24 11:31 出处:网络
I thought the iphone width/height size is 320 * 480. But the photo taken from UIImagePickerController is abou开发者_Python百科t 320 * 430.

I thought the iphone width/height size is 320 * 480. But the photo taken from UIImagePickerController is abou开发者_Python百科t 320 * 430.

Not sure whether I missed anything.


picker = [[UIImagePickerController alloc] init];
picker.showsCameraControls = NO;
picker.allowsEditing = YES;

[window addSubview: picker.view];

Any advices? Thanks.


It appears the picture size rate is 640 * 480. Assume the shorter line is width, I used :

h = 320.0f * heightFromImage / heightFromWidth;

heightFromImage is 640 and heightFromWidth = 480.

The saved image looks correct.

0

精彩评论

暂无评论...
验证码 换一张
取 消