UIGraphicsBeginImageContextWithOptions(CGSizeMake(_webView.frame.size.width, height), YES,self.view.contentScaleFactor);
CGContextRef ctx = UIGraphicsGetCurrentContext();
[_webView.layer renderInContext:ctx];
// 从当前context中创建一个改变大小后的图片
UIImage* tImage = UIGraphicsGetImageFromCurrentImageContext();
// 使当前的context出堆栈
UIGraphicsEndImageContext();