Ejemplo n.º 1
0
        protected override void writeCustomXml(XmlTextWriter writer)
        {
            writer.WriteStartElement("image");
            string    fileName = Path.GetTempPath() + "mazioPictureShape.png";
            PngFormat format   = new PngFormat();

            Img.Save(fileName, format.getCodecInfo(), format.getParameters());
            byte[] bytes = File.ReadAllBytes(fileName);
            writer.WriteBase64(bytes, 0, bytes.Length);
            writer.WriteEndElement();
        }