#pragma mark - 按比例缩放图片
- (UIImage *)changeSizeWithImage:(UIImage *)image{
float enlargeFactor = image.size.width/(float)image.size.height;
CGSize size = CGSizeMake(self.height*enlargeFactor, self.height);
UIGraphicsBeginImageContext(size);
[image drawInRect:CGRectMake(0, 0, size.width, size.height)];
UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSLog(@"%f,%f",scaledImage.size.width,scaledImage.size.height);
return scaledImage;
}