Browse Source

Image should not dispose of stream. Fix #316

Former-commit-id: 7818c6866549f63bd8964f1c6650b5deb938f25c
Former-commit-id: dfa8dfabf96353a6cde86386d87fd57360eb1df0
Former-commit-id: 3739eafa2260dc0e6ab9f292c7905a5f04e6765e
pull/1/head
James Jackson-South 11 years ago
parent
commit
f5e8014d3b
  1. 7
      src/ImageProcessorCore/Image.cs

7
src/ImageProcessorCore/Image.cs

@ -229,8 +229,6 @@ namespace ImageProcessorCore
/// Thrown if the stream is not readable nor seekable. /// Thrown if the stream is not readable nor seekable.
/// </exception> /// </exception>
private void Load(Stream stream, IList<IImageFormat> formats) private void Load(Stream stream, IList<IImageFormat> formats)
{
try
{ {
if (!stream.CanRead) if (!stream.CanRead)
{ {
@ -272,10 +270,5 @@ namespace ImageProcessorCore
throw new NotSupportedException(stringBuilder.ToString()); throw new NotSupportedException(stringBuilder.ToString());
} }
finally
{
stream.Dispose();
}
}
} }
} }

Loading…
Cancel
Save