我在下面的代码行中遇到了异常:
System.Net.WebClient wc = new System.Net.WebClient();
byte[] data = wc.DownloadData(xmlTempNode.Attributes["imageurl"].Value.ToString());
MemoryStream ms = new MemoryStream(data);
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
string strImagePath = pptdirectoryPath + "\\" + currentSlide + "_" + shape.Id + ".png";
img.Save(strImagePath);
Microsoft.Office.Interop.PowerPoint.Shape sp = shape;
xmlTempNode.Attributes["imgwidth"].Value = xmlTempNode.Attributes["imgwidth"].Value.Replace("px", "");
xmlTempNode.Attributes["imgheight"].Value = xmlTempNode.Attributes["imgheight"].Value.Replace("px", "");
//Getting exception on below line
shape.Fill.UserPicture(strImagePath);
并且strImagePath
是D:\projects\MAMMP\trunk\Applications\Applications.Web\\cache\ppt\60ba9d41-00e0-44fd-9c2c-7591c881a1a0\\6_1026.png
任何帮助家伙。