-(UIImage *)getImageSizeTo:(UIImage *)image
{
//如果图片太小就不需要压缩
if (image.size.width <= 500 || image.size.height <= 500) {
return image;
}
//压缩照片
float kCompressionQuality = 0.3;
NSData *photo = UIImageJPEGRepresentation(image, kCompressionQuality);
return [UIImage imageWithData:photo];
}