From 9491a03db524169398f8fd4258377f8b542ce90a Mon Sep 17 00:00:00 2001 From: James South Date: Thu, 16 Oct 2014 19:25:13 +0100 Subject: [PATCH] Allowing the same stream to both load an save an image Former-commit-id: 07ffcdac4ff1be15cbaa7bb79b304f5eaac596b0 Former-commit-id: 5f21873f14c3ee29c1bacb447159dde7090f2552 --- src/ImageProcessor/ImageFactory.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ImageProcessor/ImageFactory.cs b/src/ImageProcessor/ImageFactory.cs index 3957fcb269..7b0acfdceb 100644 --- a/src/ImageProcessor/ImageFactory.cs +++ b/src/ImageProcessor/ImageFactory.cs @@ -1026,6 +1026,8 @@ namespace ImageProcessor { if (this.ShouldProcess) { + // Allow the same stream to be used as for input. + stream.Seek(0, SeekOrigin.Begin); this.Image = this.CurrentImageFormat.Save(stream, this.Image); }