You can "Save" the image into a stream.
If you need a stream that can be read elsewhere, just create a MemoryStream:
var ms = new MemoryStream();
image.Save(ms, ImageFormat.Png);
// If you're going to read from the stream, you may need to reset the position to the start
ms.Position = 0;
If you need a stream that can be read elsewhere, just create a MemoryStream:
var ms = new MemoryStream();
image.Save(ms, ImageFormat.Png);
// If you're going to read from the stream, you may need to reset the position to the start
ms.Position = 0;
2 Comments
Very interesting article.
ReplyDeletePeter Black
Peter Black
Peter Black
Peter Black
Peter Black
Peter Black
Thanks for sharing such a useful blog. Really! This Blog is very informative for us which contains a lot of information about the Writing. I like this post.
ReplyDeleteMr Jone
Mr Jone
Mr Jone
Mr Jone
Mr Jone
Mr Jone
Mr Jone