Browse Source

Only need on instance of ImageConverter

Former-commit-id: a35ae46486ca8630663668dcd2fa60648fdd8832
Former-commit-id: 08a0cf520fe3e92654ed22ef168c820ba728836f
pull/17/head
James South 12 years ago
parent
commit
3b0b08b645
  1. 9
      src/ImageProcessor/Imaging/Formats/GifEncoder.cs

9
src/ImageProcessor/Imaging/Formats/GifEncoder.cs

@ -111,6 +111,12 @@ namespace ImageProcessor.Imaging.Formats
#endregion
#region Fields
/// <summary>
/// The converter for creating the output image from a byte array.
/// </summary>
private static readonly ImageConverter Converter = new ImageConverter();
/// <summary>
/// The stream.
/// </summary>
@ -244,8 +250,7 @@ namespace ImageProcessor.Imaging.Formats
this.imageStream.Flush();
this.imageStream.Position = 0;
byte[] bytes = this.imageStream.ToArray();
ImageConverter converter = new ImageConverter();
return (Image)converter.ConvertFrom(bytes);
return (Image)Converter.ConvertFrom(bytes);
}
#endregion

Loading…
Cancel
Save