+ (UIImage *)scaleFromImage:(UIImage *)image {
CGSize newSize = CGSizeMake(366, 366); //目标图片的大小
UIGraphicsBeginImageContext(newSize);
[image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData *data1 = UIImagePNGRepresentation(newImage);
CGFloat dataSize1 = data1.length/1024;
NSLog(@"###########%.2f",dataSize1);
return newImage;
CGSize newSize = CGSizeMake(366, 366); //目标图片的大小
UIGraphicsBeginImageContext(newSize);
[image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData *data1 = UIImagePNGRepresentation(newImage);
CGFloat dataSize1 = data1.length/1024;
NSLog(@"###########%.2f",dataSize1);
return newImage;
}