IOS 拍照上传图片服务器端偏转90度解决办法

在上传之前对图片做下处理~!

if (tempImage.imageOrientation != UIImageOrientationUp) {

UIGraphicsBeginImageContextWithOptions(tempImage.size, NO, tempImage.scale);

[tempImage drawInRect:(CGRect){0,0,tempImage.size}];

UIImage *normalizedImage = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

tempImage = normalizedImage;

}


IOS 拍照上传图片服务器端偏转90度解决办法_第1张图片

你可能感兴趣的:(IOS 拍照上传图片服务器端偏转90度解决办法)