Exemple #1
0
        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));
        }
Exemple #2
0
        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);
        }