Browse Source

Only need on instance of ImageConverter

Former-commit-id: 97d0d2a61bdb7e980f94847e6abd30381f9dbf52
Former-commit-id: f4e05c6674ef63bde6a607f0e2bb28a6f724372a
af/merge-core
James South 11 years ago
parent
commit
e924a6d2ce
  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