using (var ms = new MemoryStream(byteArrayIn)) { return Image.FromStream(ms); }
Quote:You must keep the stream open for the lifetime of the Image.
using (MemoryStream ms = new MemoryStream(byteArrayIn)) { using (Image im = Image.FromStream(ms)) { return new Bitmap(im); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)