title: How to convert FileStreamResult to IFormFile?
body: <p>I change the size of the image with this code. But this method returns <code>FileStreamResult</code>. I want to convert <code>FileStreamResult</code>  to <code>IFromFile</code>. How can I do that?</p>
  <p>Note: I am using <a href="https://github.com/CoreCompat/CoreCompat" rel="nofollow noreferrer">CoreCompat</a>  to change the image size.</p>
  <pre><code>public FileStreamResult ChangeSize(IFormFile file)  
  {
      using (var img = System.Drawing.Image.FromStream(file.OpenReadStream()))
      {
          Stream ms = new MemoryStream(img.Resize(100, 100).ToByteArray());
  
          return new FileStreamResult(ms, &quot;image/jpg&quot;);
      }
  }
  </code></pre>