How can I clone a FileStream type?
The problem is what I use MagickNet.Image(inputStream)to get stretch images before saving, but it seems to close the input stream.
So, I can send a clone of the inputStream function to the function, so the function cannot edit the real inputStream object?
This is my function:
public Picture GetPictureDimension(Stream inputStream, Picture picture)
{
var img = new MagickNet.Image(inputStream);
picture.Width = img.Columns;
picture.Height = img.Rows;
return picture;
}
source
share