I’m using an image component that has a FromBinary method. Wondering how do I convert my input stream into a byte array
HttpPostedFile file = context.Request.Files[0]; byte[] buffer = new byte[file.ContentLength]; file.InputStream.Read(buffer, 0, file.ContentLength); ImageElement image = ImageElement.FromBinary(byteArray);
Use a BinaryReader object to return a byte array from the stream like: