From e9ebaa66c87b54035014ffdfa3e69abfd756c7da 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: a37a9c7ac125eeeff6589778ef3d8626373c59f1 Former-commit-id: dc33ef7ac50d67175796e7cf785bf98ea093099a --- src/ImageProcessor/ImageFactory.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ImageProcessor/ImageFactory.cs b/src/ImageProcessor/ImageFactory.cs index 3957fcb26..7b0acfdce 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); }