public static EmbeddedImageType EmbedImage(string pName, string pImagePath, ReportType pReport) { Image vImage = Image.FromFile(pImagePath); string vMIMEType = Base64Util.GetMIMEType(pImagePath); return(EmbedImage(pName, vImage, vMIMEType, pReport)); }
public static EmbeddedImageType EmbedImage(string pName, Image pImage, string pMIMEType, ReportType pReport) { EmbeddedImageType embededImage = new EmbeddedImageType(pName); embededImage.MIMEType = pMIMEType; embededImage.ImageData = Base64Util.ImageToBase64String(pImage);; pReport.EmbeddedImages.Add(embededImage); return(embededImage); }