/// <summary> /// 获取网页图片 /// </summary> /// <param name="strHtml">网页源码</param> /// <param name="Encodes">编码</param> /// <param name="imagePath">图片存放地址</param> public static void getWebImage(string strHtml, string Encodes, string imagePath) { SDWebCache wc = new SDWebCache(HtmlUtil.GetWebCode(strHtml, Encodes)); Bitmap image = wc.Snap(); image.Save(imagePath); }
private void getWebImage(string strHtml, string Encodes, string imagePath) { SDWebCache wc = new SDWebCache(GetWebCode(strHtml, Encodes)); Bitmap image = wc.Snap(); image.Save(imagePath); }