How can I clone FileStream type?
The problem is that I using MagickNet.Image(inputStream)
to get the image distentions before saving it, but it seems to closing the inputStream.
So, I can send a clone of inputStream 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;
}