Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/20/11 10:20:19 (13 years ago)
Author:
epitzer
Message:

Lock bitmap while saving and remove configuration info when other exceptions occur (#1560)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs

    r5445 r6446  
    2828  internal sealed class Bitmap2XmlSerializer : PrimitiveXmlSerializerBase<Bitmap> {
    2929
    30     public override XmlString Format(Bitmap o) {
     30    public override XmlString Format(Bitmap o) {     
    3131      MemoryStream stream = new MemoryStream();
    32       o.Save(stream, ImageFormat.Png);
     32      lock (o)
     33        o.Save(stream, ImageFormat.Png);
    3334      byte[] array = stream.ToArray();
    3435      Byte1DArray2XmlSerializer serializer = new Byte1DArray2XmlSerializer();
Note: See TracChangeset for help on using the changeset viewer.