public static Image StreamToImage(byte[] buff) { MemoryStream ms = new MemoryStream(buff); Image img = Image.FromStream(ms); return img; }