我需要使用image height
和width
。我的800*800
像素image
在我的ios simulator
中。但是,当我发现的image
使用iPhone中的图片尺寸不正确
image.size.width and image.size.height
它给我315*120
这是不正确为何如此规模?
- (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info
{
NSLog(@"%@",info);
int temp = [[DataManager sharedObj] imageCount];
for(NSDictionary *dict in info)
{
[[DataManager sharedObj] setImageCount:temp+1];
NSMutableDictionary* dataDic = [[NSMutableDictionary alloc] init];
UIImage* img = [dict objectForKey:UIImagePickerControllerOriginalImage];
NSLog(@"%.2f",img.size.width);
NSLog(@"%.2f",img.size.height);
}
}
但我不知道每个image.so的大小如何我可以做到这一点。图像的帧大小不是帧 – test 2012-08-01 09:15:17
你确定'图像'是'UIImage'而不是'UIImageView'的帧大小为315 * 120? – elp 2012-08-01 09:21:10
yes图像是UIImage – test 2012-08-01 09:27:19