- Timestamp:
- 03/11/10 12:54:14 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs
r2965 r3004 11 11 12 12 namespace HeuristicLab.Persistence.Default.Xml.Primitive { 13 public class Bitmap2XmlSerializer :PrimitiveXmlSerializerBase<Bitmap>{ 14 private static Regex re = new Regex(@"<!\[CDATA\[((?:[^]]|\](?!\]>))*)\]\]>", RegexOptions.Singleline); 13 public class Bitmap2XmlSerializer : PrimitiveXmlSerializerBase<Bitmap> { 15 14 16 15 public override XmlString Format(Bitmap o) { 17 16 MemoryStream stream = new MemoryStream(); 18 o.Save(stream, ImageFormat.Png);17 o.Save(stream, ImageFormat.Png); 19 18 byte[] array = stream.ToArray(); 20 19 Byte1DArray2XmlSerializer serializer = new Byte1DArray2XmlSerializer(); … … 32 31 Bitmap bitmap = new Bitmap(stream); 33 32 return bitmap; 34 }33 } 35 34 } 36 35 }
Note: See TracChangeset
for help on using the changeset viewer.