IPhone相机宽高比,节省规模和尺寸

时间:2014-07-14 01:06:23

标签: ios iphone ios7 uiimage uiimagepickercontroller

我正在保存用相机拍摄的iphone照片,用于我正在制作的应用程序:

    float w = photo.size.width;
    float h = photo.size.height;

    CGRect rect = CGRectMake(0,0,300,400);
    UIGraphicsBeginImageContext( rect.size );
    [photo drawInRect:rect];
    UIImage *picture1 = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    NSData *photoData = UIImagePNGRepresentation(picture1);

浮点数总是:

 w = 2448
 h = 3264

这是所有设备上所有iphone照片的宽高比吗?

0 个答案:

没有答案